Arrest command doesn't work
#1

PHP код:
command(arrestplayerid,params[])
{
    new 
string[128];
    new 
ID;
    new 
time;
    
    if (
sscanf(params"ud"IDtime))
    {
        if(
Factions[Player[playerid][Faction]][CommandTypes] == || Factions[Player[playerid][Faction]][CommandTypes] == 3)
        {
            
SendClientMessage(playeridCOLOR_GREY"SYNTAX: /arrest [playerid/name] [minutes]");
        }
        else
        {
            
RemoveTextMessage(playerid);
            
TextDrawShowForPlayer(playeridText:CantCommand);
            
SetTimerEx("RemoveTextMessage"3500false"d"playerid);
        }
    }
    if(
GetDistanceBetweenPlayers(playerid,ID) > 4)
    {
        
format(string,sizeof(string),"%s(%d) is too far away. You cannot reach him to arrest him.",RPName(ID),ID);
        
SendClientMessage(playerid,-1,string);
        return 
1;
    }
    if(
GetDistanceBetweenPlayers(playerid,ID) <= 4)
    {
        
ResetPlayerWeapons(ID);
        
Player[ID][Arrest] = 1;
        
Player[ID][PrisonTime] = time 60;
        
SetPlayerSpecialAction(IDSPECIAL_ACTION_NONE);
        
format(stringsizeof(string), "> You've arrested %s for %d days at San Andreas Prison."RPName(ID), time);
        
SendClientMessage(playeridSPECIALORANGEstring);
        
format(stringsizeof(string), "> %s has you arrested for %d days at San Andreas Prison."RPName(playerid), time);
        
SendClientMessage(IDSPECIALORANGEstring);
    }
    return 
1;

Helllo,

If you just put /arrest to check if it works, (Without ID and Time)
You will get

/arrest [id][time]
> You've arrested %s for %d days at San Andreas Prison.
> %s has you arrested for %d days at San Andreas Prison.
Reply


Messages In This Thread
Arrest command doesn't work - by lulo356 - 21.01.2016, 00:52
Re: Arrest command doesn't work - by Sew_Sumi - 21.01.2016, 00:57
Re: Arrest command doesn't work - by lulo356 - 21.01.2016, 01:18
Re: Arrest command doesn't work - by Sew_Sumi - 21.01.2016, 02:44
Re: Arrest command doesn't work - by Threshold - 21.01.2016, 02:50
Re: Arrest command doesn't work - by Weponz - 21.01.2016, 05:49
Re: Arrest command doesn't work - by lulo356 - 21.01.2016, 13:40
Re: Arrest command doesn't work - by Sew_Sumi - 21.01.2016, 22:40
Re: Arrest command doesn't work - by lulo356 - 21.01.2016, 23:58
Re: Arrest command doesn't work - by Sew_Sumi - 22.01.2016, 05:17

Forum Jump:


Users browsing this thread: 1 Guest(s)