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


Messages In This Thread
timer not working - by killdahobo99 - 31.07.2009, 18:08
Re: timer not working - by Doppeyy - 31.07.2009, 18:11
Re: timer not working - by MadeMan - 31.07.2009, 18:12
Re: timer not working - by killdahobo99 - 31.07.2009, 18:16

Forum Jump:


Users browsing this thread: 1 Guest(s)