timer not working
#1

Why isnt this timer working for my /ar command


Top of my script:
Код:
forward Taze(playerid);
forward ExitJail(playerid);
Heres the /ar command:


Код:
	new pname;
	new giveplayerid;
	if(!strcmp(cmd, "/ar", true))
	{
		if (gTeam[playerid] == TEAM_COP)
		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp)) return SendClientMessage(playerid,	COLOR_ORANGE, "USAGE: /ar [playerid]");
			id = strval(tmp);

			Jailed[id] = 1;
			SetTimer("ExitJail",120000,0);
		 	SetPlayerInterior(giveplayerid,3);
      SetPlayerPos(giveplayerid,198.3797,160.8905,1003.0300);
      SetPlayerFacingAngle(giveplayerid,177.0350);
      SetCameraBehindPlayer(giveplayerid);

			GetPlayerName(id, oname, sizeof(oname));
			format(string, sizeof(string), "You have arrested %s (id: %d)", oname, id);
			SendClientMessage(playerid, COLOR_YELLOW, string);

			SendClientMessage(id, COLOR_YELLOW, "You have been sent to jail for your criminal acts");

			format(string, sizeof(string), "%s has been arrested by %s", oname, pname);
			print(string);
			}
			else return SendClientMessage(playerid, COLOR_LIME, "Only Law enforcement agents can use this command! ");
		return 1;
	}
//bottom of my script

Код:
public ExitJail(playerid)
{
    SendClientMessage(playerid, COLOR_WHITE,"You are now free!");
    SetPlayerPos(playerid,2234.1221,2454.1604,10.8051);
    SetPlayerInterior(playerid,0);
    return 1;
}
Reply
#2

Change
Код:
SetTimer("ExitJail",120000,0);
To
Код:
SetTimer("ExitJail",120000,false);
Then it should work fine.

Gr Artix
Reply
#3

pawn Код:
SetTimerEx("ExitJail",120000,0,"d",playerid);
Reply
#4

I want it to actually display a countdown...how do i do that? i already got the timer and everything set...so how do i make it display the actual countdown now?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)