31.07.2009, 18:08
Why isnt this timer working for my /ar command
Top of my script:
Heres the /ar command:
//bottom of my script
Top of my script:
Код:
forward Taze(playerid); forward ExitJail(playerid);
Код:
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;
}
Код:
public ExitJail(playerid)
{
SendClientMessage(playerid, COLOR_WHITE,"You are now free!");
SetPlayerPos(playerid,2234.1221,2454.1604,10.8051);
SetPlayerInterior(playerid,0);
return 1;
}

