I want use a timer!
#1

I want use a 10secdons before the player goto Into jail how?


PHP код:
if(GetPlayerWantedLevel(targetid) == 100)
            {
                
TimerArrest[targetid] = SetTimerEx("BeginArrestedTimer"10000false,"i"targetid); // 10 Secdons timer
                
BeginArrested[targetid] = 1;
                
SetPlayerSpecialAction(targetidSPECIAL_ACTION_CUFFED);
                
ApplyAnimation(playerid"ped""ARRESTgun"4.101111);
                new 
ArrestReward random(15000) + 2500;
                if(
ArrestReward GetPlayerCash(playerid))
                
SetPlayerAttachedObject(targetid8194186, -0.0110000.028000, -0.022000, -15.600012, -33.699977, -81.7000350.8919991.0000001.168000);
                
format(stringsizeof(string), "{0080FF}[BEING ARRESTED]: {FFFFFF}Law Enforcement Officer %s(%d) has put {ADFF2F}Handcuffs {FFFFFF}on you."pNameplayerid);
                
format(stringsizeof(string), "You have placed {0080FF}%s(%d) {FFFFFF}in Handcuffs for an Arrest. Use {0080FF}/search (id) {FFFFFF}to search Him for illegal Drugs."tNametargetid);
                
SendClientMessage(targetid, -1"{0080FF}[BEING ARRESTED]: {FFFFFF}Use {0080FF}/breakcuffs (/bc) {FFFFFF}to attempt to evade the Arrest.");
                
format(stringsizeof(string), "{ffffff}You have Arrested {FFD700}%s(%d){FFFFFF}. You have received {33FF33}$%d {FFFFFF}for this Arrest."tNametargetidArrestReward);
                
SendClientMessage(playeridredstring);
                
format(stringsizeof(string), "{0080FF}[ARRESTED]: {FFD700}%s(%d) {FFFFFF}has been {33CCFF}Arrested {FFFFFF}by {308AFF}Officer %s(%d){FFFFFF}!"tNametargetidpNameplayerid);
                
SendClientMessageToAll(yellowstring);
                
format(stringsizeof(string), "~w~You have ~G~Arrested ~Y~%s(%d)~n~n~You have received ~n~n~~y~$%d ~w~for this Arrest."tNametargetidArrestReward);
                
GameTextForPlayer(playeridstring70005);
                
GivePlayerMoney(playeridArrestReward);
                
SetPlayerScore(playeridGetPlayerScore(playerid)+1);
                
SetPlayerScore(playeridGetPlayerScore(targetid)-1);
                
pJailTimerID[targetid] = SetTimerEx("pJailTimer"1000true"i"targetid);
                
pJailCount[targetid] = 80 random(100);
                new 
Random random(sizeof(RandomJailSpawns));
                
SetPlayerPos(targetidRandomJailSpawns[Random][0], RandomJailSpawns[Random][1], RandomJailSpawns[Random][2]);
                
SetPlayerFacingAngle(targetidRandomJailSpawns[Random][2]);
                
ResetPlayerWeapons(targetid);
                
SetPlayerColor(targetidCOLOR_WHITE);
                
SetPlayerInterior(targetid3);
                
SetPlayerWantedLevel(targetid,0);
                
SetPVarInt(playerid,"ArTime",GetTickCount()+5000);
            } 
I've trying use a timer but not work it there up TimerArrest
Reply


Messages In This Thread
I want use a timer! - by RedRex - 02.02.2018, 19:08
Re: I want use a timer! - by Inn0cent - 02.02.2018, 20:09
Re: I want use a timer! - by Mugala - 02.02.2018, 20:56
Re: I want use a timer! - by RedRex - 03.02.2018, 09:34
Re: I want use a timer! - by PepsiCola23 - 03.02.2018, 09:46
Re: I want use a timer! - by RedRex - 03.02.2018, 09:48
Re: I want use a timer! - by shourya - 03.02.2018, 11:05
Re: I want use a timer! - by RedRex - 03.02.2018, 13:43
Re: I want use a timer! - by shourya - 03.02.2018, 15:37
Re: I want use a timer! - by RedRex - 03.02.2018, 16:29

Forum Jump:


Users browsing this thread: 1 Guest(s)