Command not working?
#1

Hello SA-MP Community, Today i just made a ZCMD command, it doesn't work for some reason, when i do /crashplayer it says you are not logged in rcon and that's good because im not logged in,
when i log in it says Usage : /crashplayer <playerid> and that's good

But when i try to crash myself, it says player not found. and when i try other player IDS it says Player not found also? what is the problem! Please help!

pawn Код:
CMD:crashplayer(playerid, params[])
{
    if(!IsPlayerAdmin(playerid))
        return SendClientMessage(playerid, COLOR_RED, "You need to be an admin to use this command!");
    new targetid;
    if(sscanf( params, "u", targetid))
        return SendClientMessage(playerid, COLOR_RED, "Usage: /crashplayer <playerid>");
    else if( playerid == targetid)
        return SendClientMessage(playerid, COLOR_RED, "You can't crash yourself!");
    else if(targetid == INVALID_PLAYER_ID)
        return SendClientMessage(playerid, COLOR_RED, "Player not found.");
    new
        pName[24],
        str[128];
    GetPlayerName(targetid, pName, 24);
    format(str, 128, "You crashed %s", pName);
    SendClientMessage(playerid, COLOR_ORANGE, str);
    CrashClient(targetid);
    return 1;
}
The stock CrashClient:

pawn Код:
stock CrashClient(playerid)
{
    if(!IsPlayerConnected(playerid)) return false;
    return GameTextForPlayer(playerid, "~~~~~~~~~~~~~~~~~", 1000, 5);
}
Reply


Messages In This Thread
Command not working? - by SilverKiller - 05.03.2013, 15:09
Re : Command not working? - by yusei - 05.03.2013, 15:16
Re: Command not working? - by InfiniTy. - 05.03.2013, 15:20
Re: Re : Command not working? - by SilverKiller - 05.03.2013, 15:23
Re: Re : Command not working? - by InfiniTy. - 05.03.2013, 15:28
Re: Command not working? - by psychopathe - 05.03.2013, 15:32
Re: Command not working? - by SilverKiller - 05.03.2013, 15:43
Re: Command not working? - by Patrick - 05.03.2013, 16:31
Re: Command not working? - by SilverKiller - 05.03.2013, 16:36
Re: Command not working? - by Patrick - 05.03.2013, 16:42

Forum Jump:


Users browsing this thread: 1 Guest(s)