11.09.2012, 15:58
Hello guys..
I've been a long time away from SA:MP and now I'm coming back, but there's lot of modifications, one of those is the sscanf..
Well, I'm trying to make a simple command, /kick but the problem is..
I always get this message.
of course I have on the top of my GM
My command is this one;
I'm using the last version of sscanf, I already tried lot of things, still doesn't work, can some help me?
Thank you.
I've been a long time away from SA:MP and now I'm coming back, but there's lot of modifications, one of those is the sscanf..
Well, I'm trying to make a simple command, /kick but the problem is..
I always get this message.
PHP код:
USAGE: /kick [playerid] [reason]
PHP код:
new string[MAX_PLAYERS][128], iPlayer;
PHP код:
CMD:kick(playerid, params[]) {
if(AdminLevel(playerid, 1)) return 1;
if(sscanf(params,"us[128]", iPlayer, string[playerid]))
return SendClientMessage(playerid, cinza,"USAGE: /kick [playerid] [reason]");
if(!IsPlayerConnected(iPlayer))
return ERROR4//Will return a message that the player isn't online
format(string[iPlayer], 128, "%s(%d) was disconnected by %s(%d) reason: %s", gName(iPlayer), iPlayer, gName(playerid), playerid, string[playerid]);
SendClientMessageToAll(red, string[iPlayer]);
Kick(iPlayer);
return true;
}
Thank you.