Jail Command - Saving + shown
#2

Code:
new countt[MAX_PLAYERS], counter[MAX_PLAYERS];
Code:
forward JailCount(playerid);
public JailCount(playerid)
{
    new string[55];
    counter[playerid]--;
    format(string, sizeof(string),"~b~%d Second remaining", counter[playerid]);
    GameTextForPlayer(playerid, string, 990, 3);
    if(counter[playerid] <= 0)
    {
        format( string, sizeof(string), "~g~Released from jail");
        GameTextForPlayer(playerid, string, 990, 3);
        KillTimer(countt[playerid]);
        Jailed[playerid] = 0;
		SpawnPlayer(playerid);
		SetPlayerVirtualWorld(playerid, 0);
		SetPlayerInterior(playerid, 0);
		new Float: PPos[3];
		GetPlayerPos(playerid, PPos[0], PPos[1], PPos[2]);
		PlayerPlaySound(playerid, 1058, PPos[0], PPos[1], PPos[2]);
    }
    return 1;
}
and add to your command
Code:
RemovePlayerFromVehicle(id);
ResetPlayerWeapons(id);
SetPlayerPos(id, 264.8763, 77.8042, 1001.0391);//jail pos
SetPlayerInterior(id, 6);//jail interior
Jailed[id] = 1;//jailed variable
new time = secconds*1000
counter[id] = 60;
countt[id] = SetTimerEx("Count", time, true, "i", id);
By the way, your sccanf doesn't contain time

Code:
if(sscanf(params,"uis[124]",id, secconds, Reason)) return SendClientMessage(playerid,-1,"[Admin]: /jail [ID | Name] [secconds] [Reason]");
Reply


Messages In This Thread
Jail Command - Saving + shown - by yvoms - 27.07.2016, 22:51
Re: Jail Command - Saving + shown - by Shinja - 27.07.2016, 23:21
Re: Jail Command - Saving + shown - by yvoms - 27.07.2016, 23:34
Re: Jail Command - Saving + shown - by AndySedeyn - 27.07.2016, 23:34
Re: Jail Command - Saving + shown - by yvoms - 28.07.2016, 08:07
Re: Jail Command - Saving + shown - by AndySedeyn - 28.07.2016, 09:06
Re: Jail Command - Saving + shown - by yvoms - 28.07.2016, 09:11
Re: Jail Command - Saving + shown - by AndySedeyn - 28.07.2016, 09:15
Re: Jail Command - Saving + shown - by yvoms - 28.07.2016, 09:30

Forum Jump:


Users browsing this thread: 1 Guest(s)