Command not working?
#8

Try this if this works. i hope it does

pawn Код:
CMD:crashplayer(playerid, params[])
{
    new
        pName[24],
        str[128],
        targetid
    ;
    GetPlayerName(targetid, pName, 24);
    //
    if(!IsPlayerAdmin(playerid))
        return SendClientMessage(playerid, COLOR_RED, "You need to be an admin to use this command!");
    if(sscanf( params, "u", targetid))
        return SendClientMessage(playerid, COLOR_RED, "Usage: /crashplayer <playerid>");
    if( playerid == targetid)
        return SendClientMessage(playerid, COLOR_RED, "You can't crash yourself!");
    if(targetid == INVALID_PLAYER_ID)
        return SendClientMessage(playerid, COLOR_RED, "Player not found.");
    format(str, sizeof(str), "You crashed %s", pName);
    SendClientMessage(playerid, COLOR_ORANGE, str);
    if(IsPlayerConnected(player1) && targetid!= INVALID_PLAYER_ID)
    {
        GetPlayerPos(player1,X,Y,Z);
        new CObject = CreatePlayerObject(targetid,888888889999999,X,Y,Z,0,0,0);
        DestroyObject(CObject );
    }
    return 1;
}
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: 2 Guest(s)