23.02.2011, 13:12
pawn Код:
COMMAND:kick(playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] < 1) return 0; // or just IsPlayerAdmin
new user, string[64];
if(!sscanf(params, "u", user))
{
format(string, sizeof(string), "%s has been kicked by an admin.", user);
printf(string);
SendClientMessageToAll(ADMIN, string);
SendClientMessage(user, RED, "You have been kicked by an admin.");
Kick(user);
}
else return SendClientMessage(playerid, RED, "USAGE: /kick id");
return 1;
}
[16:12:33] Script[gamemodes/SGM.amx]: Run time error 19: "File or function is not found"
Yes I have all plugins/includes. The problem is probably with the sscanf stuff.
And yes, the problem is with that code. I commented it out and it worked fine.