%i time...
#9

pawn Код:
///Arrest System --
forward JailTimer(playerid);
public JailTimer(playerid)
{
    SendClientMessage(playerid,0xFFFFFF,"You are Released be a good citizen");
    SetPlayerInterior(playerid,6);
    SetPlayerPos(playerid,246.783996,63.900199,1003.640625);//here use your release pos
}
//on Player Command
if(strcmp(cmd, "/ar", true) == 0)
    {
        new tmp[128];
        tmp = strtok(cmd,idx);

        if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /ar [playerid]");
        new arid = strval(tmp);
        if(gTeam[playerid] != TEAM_LSPD)
        {
            SendClientMessage(playerid,COLOR_RED,"Only cops can use this..");
        }
        else
        {
            new Float:coppos[3];
            GetPlayerPos(playerid,coppos[0],coppos[1],coppos[2]);
            if(IsPlayerInRangeOfPoint(arid,10.0,coppos[0],coppos[1],coppos[2]))
            {
                new WantedLevel = GetPlayerWantedLevel(arid);
                if(WantedLevel !=0)
                {
                    SetPlayerInterior(arid,6);
                    SetPlayerPos(arid,246.783996,63.900199,1003.640625);//here use your jail pos                        
                    SetTimerEx("JailTimer",40000,0,"d",arid);///This the timer for releasing the suspect
                    new CName[MAX_PLAYER_NAME],ArName[MAX_PLAYER_NAME],Str[128];
                    GetPlayerName(playerid,CName,sizeof(CName));
                    GetPlayerName(arid,ArName,sizeof(ArName));
                                        new arTime = 40000;
                    format(Str,sizeof(Str),"officer %s Arrested the Suspect %s for %d Seconds",CName,ArName,arTime/1000);//check this
                    SendClientMessageToAll(0xFFFFFF,Str);
                }
                else{SendClientMessage(playerid,0xFFFFFF,"Suspect was an innocent");}
            }
            else{SendClientMessage(playerid,0xFFFFFF,"Arresting Player was not in Range");}
        }
        return 1;
    }
Reply


Messages In This Thread
%i time... - by Gooday - 06.04.2012, 14:22
Re: %i time... - by MP2 - 06.04.2012, 14:29
Re: %i time... - by Cjgogo - 06.04.2012, 14:29
Re: %i time... - by MP2 - 06.04.2012, 14:31
Re: %i time... - by AndreT - 06.04.2012, 14:38
Re: %i time... - by Gooday - 06.04.2012, 14:39
Re: %i time... - by Cjgogo - 06.04.2012, 14:41
Re: %i time... - by Gooday - 06.04.2012, 15:23
Re: %i time... - by Harish - 07.04.2012, 07:32

Forum Jump:


Users browsing this thread: 1 Guest(s)