Hallo...
Bei mir funkt /ban nicht, es kommt immer
Player Not Connected!
Da der Code:
CMD:ban(playerid, params[])
{
levelerror(4);
if (sscanf(params, "us[200]", plid, estring)) return SendErrorMessage(playerid, "Usage: /ban <id> <reason>");
if (!IsPlayerConnected(plid)) return SendErrorMessage(playerid, "Player Not Connected!");
format(string, sizeof(string), "You have banned {FFFFFF}%s(%d)", PlayerName(plid), plid);
SendClientMessage(playerid, 0x66FF33, string);
format(largestring, sizeof(largestring), "Admin %s banned you from the server\r\nReason:%s", PlayerName(playerid), estring);
ShowPlayerDialog(plid, DIALOG_KICK, DIALOG_STYLE_MSGBOX, "You have been banned", largestring, "Ok", "Cancel");
GetPlayerIp(plid, PIP, 50);
new Hour, Minute, Second, Year, Month, Day;
gettime(Hour, Minute, Second);
getdate(Year, Month, Day);
format(string, sizeof(string), "d:d:d on d/d/%d", Hour, Minute, Second, Day, Month, Year);
format(Query, sizeof(Query), "INSERT INTO `banlog` (`time`, `name`, `ip`, `reason`, `admin`, `banned`) VALUES ('%s', '%s', '%s', '%s', '%s', 1)", string, escpname(plid), PIP, escstring(estring), escpname(playerid));
mysql_query(Query);
mysql_free_result();
Kick(plid);
return 1;
}
Bei /kick die gleiche sache:
CMD:kick(playerid, params[])
{
levelerror(3);
if(sscanf(params, "us[200]", plid, estring)) return SendErrorMessage(playerid, "Usage: /kick <id> <reason>");
if (!IsPlayerConnected(plid)) return SendErrorMessage(playerid, "Player Not Connected!");
format(string, sizeof(string), "You have kicked {FFFFFF}%s(%d)", PlayerName(plid), plid);
SendClientMessage(playerid, 0x66FF33, string);
format(largestring, sizeof(largestring), "You have been kicked from the server by admin %s(%d) \r\nReason:%s", escpname(playerid), playerid, estring);
ShowPlayerDialog(plid, DIALOG_KICK, DIALOG_STYLE_MSGBOX, "You have been kicked", largestring, "Ok", "Cancel");
Kick(plid);
return 1;
}