09.03.2014, 17:39
Hi, whenever a player is jailed, it displays it in the chat and everything perfectly, however, the player is stuck in jail for longer than the set amount of minutes, and doesn't get released.
Jail script:
Is anyone able to give me a hand with this? I'm kinda trying to get back into PAWN so sorry if this is a easy mistake.
Also wondering if someone can give me a hand with how to record their jails into a notepad file.
Jail script:
Code:
new JailTimer[MAX_PLAYERS];
CMD:jail(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] <= 4) return 1;
new targetid, minutes, reason[64];
if(sscanf(params, "riS[64]", targetid, minutes, reason))SendClientMessage(playerid, -1, "USAGE: /jail [id] [minutes] [reason]");
else
{
new str[128];
format(str, sizeof(str), "AdmCmd: Administrator %s has jailed %s for %d minutes. Reason: %s", Name(playerid), Name(targetid), minutes, reason);
JailTimer[targetid] = SetTimer("Unjail", minutes*60*1000, false);
SetPlayerInterior(targetid, 6);
SetPlayerPos(targetid, 264.4176, 77.8930, 1001.0391);
PlayerInfo[targetid][pJailed] = 1;
SendClientMessageToAll(0xFF0000FF, str);
SetPlayerHealth(targetid, 9999);
GameTextForPlayer(targetid, "Welcome to AJAIL!", 5000, 6);
}
return 1;
}
Also wondering if someone can give me a hand with how to record their jails into a notepad file.



^