Command not working?
#2

hello, Try the following

PHP код:
CMD:crashplayer(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) return  SendClientMessage(playeridCOLOR_RED"You need to be an admin to use this command!");
    
    new 
targetid;
    if(
sscanfparams"u"targetid)) SendClientMessage(playeridCOLOR_RED"Usage: /crashplayer <playerid>");
    else if( 
playerid == targetidSendClientMessage(playeridCOLOR_RED"You can't crash yourself!");
    else if(
targetid == INVALID_PLAYER_ID)   SendClientMessage(playeridCOLOR_RED"Player not found.");
    new
        
pName[24],
        
str[128];
    
GetPlayerName(targetidpName24);
    
format(str128"You crashed %s"pName);
    
SendClientMessage(playeridCOLOR_ORANGEstr);
    
CrashClient(targetid);
    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: 1 Guest(s)