28.08.2017, 10:40
Hello im tried to put timer 10secdons for Begin arrested but not worked Why? i've add this
At the command i add this
But its not worked why?
At the command i add this
PHP код:
TimerArrest[targetid] = SetTimerEx("BeginArrestedTimer", 10000, false,"ui", targetid); // 10 Secdons timer
BeginArrested[targetid] = 1;
SetPlayerSpecialAction(targetid, SPECIAL_ACTION_CUFFED);
SetPlayerAttachedObject(targetid, 7, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
ShowDescriptionText(targetid, string);
format(string, sizeof(string), "[BEING ARRESTED]: {FFFFFF}Law Enforcement Officer %s(%d) has put {ADFF2F}Handcuffs {FFFFFF}on you.", pName, playerid);
format(string, sizeof(string), "[BEING ARRESTED]: {FFFFFF}Use {0080FF}/breakcuffs (/bc) {FFFFFF}to attempt to evade the Arrest.", pName, playerid);
SendClientMessage(targetid, blue, string);
SendClientMessage(targetid, blue, string);
Код:
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; }