Timer.
#1

Hello im tried to put timer 10secdons for Begin arrested but not worked Why? i've add this

At the command i add this

PHP код:
TimerArrest[targetid] = SetTimerEx("BeginArrestedTimer"10000false,"ui"targetid); // 10 Secdons timer
                
BeginArrested[targetid] = 1;
                
SetPlayerSpecialAction(targetidSPECIAL_ACTION_CUFFED);
                 
SetPlayerAttachedObject(targetid7194186, -0.0110000.028000, -0.022000, -15.600012, -33.699977, -81.7000350.8919991.0000001.168000);
                
ShowDescriptionText(targetidstring);
                
format(stringsizeof(string), "[BEING ARRESTED]: {FFFFFF}Law Enforcement Officer %s(%d) has put {ADFF2F}Handcuffs {FFFFFF}on you."pNameplayerid);
                
format(stringsizeof(string), "[BEING ARRESTED]: {FFFFFF}Use {0080FF}/breakcuffs (/bc) {FFFFFF}to attempt to evade the Arrest."pNameplayerid);
                
SendClientMessage(targetidbluestring);
                
SendClientMessage(targetidbluestring); 
Код:
public BeginArrestedTimer(playerid)
{
	if(BeginArrested[playerid] == 1)
	{
 		new pName[MAX_PLAYER_NAME],tName[MAX_PLAYER_NAME],targetid;
 		GetPlayerName(playerid, pName, sizeof(pName));
		GetPlayerName(targetid, tName, sizeof(tName));
		KillTimer(TimerArrest[targetid]);
		new Random = random(sizeof(RandomJailSpawns));
  		SetPlayerPos(targetid, RandomJailSpawns[Random][0], RandomJailSpawns[Random][1], RandomJailSpawns[Random][2]);
    	SetPlayerFacingAngle(targetid, RandomJailSpawns[Random][0]);

	}
	return 1;
}
But its not worked why?
Reply


Messages In This Thread
Timer. - by Thanks - 28.08.2017, 10:40
Re: Timer. - by thegamer355 - 28.08.2017, 11:07
Re: Timer. - by Thanks - 29.08.2017, 00:41
Re: Timer. - by Thanks - 29.08.2017, 00:53
Re: Timer. - by thegamer355 - 29.08.2017, 05:48
Re: Timer. - by Thanks - 29.08.2017, 07:14

Forum Jump:


Users browsing this thread: 1 Guest(s)