[HELP] sscanf 2.6 + zcmd
#1

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.

PHP код:
USAGE: /kick [playerid] [reason
of course I have on the top of my GM
PHP код:
new string[MAX_PLAYERS][128], iPlayer
My command is this one;

PHP код:
CMD:kick(playeridparams[]) {
    if(
AdminLevel(playerid1)) return 1;
    if(
sscanf(params,"us[128]"iPlayerstring[playerid]))
        return 
SendClientMessage(playeridcinza,"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), iPlayergName(playerid), playeridstring[playerid]);
    
SendClientMessageToAll(redstring[iPlayer]);
    
Kick(iPlayer);
    return 
true;

I'm using the last version of sscanf, I already tried lot of things, still doesn't work, can some help me?
Thank you.
Reply


Messages In This Thread
[HELP] sscanf 2.6 + zcmd - by gilpenner - 11.09.2012, 15:58
Re: [HELP] sscanf 2.6 + zcmd - by Dokins - 11.09.2012, 16:04
Re: [HELP] sscanf 2.6 + zcmd - by gilpenner - 11.09.2012, 16:15
Re: [HELP] sscanf 2.6 + zcmd - by gilpenner - 11.09.2012, 16:41

Forum Jump:


Users browsing this thread: 1 Guest(s)