Jail system
#6

Quote:
Originally Posted by Dragonsaurus
Посмотреть сообщение
And multiply the seconds variable with 1000.
What about this?
Edit: Here is the script:
pawn Код:
public SendPlayerToJail(playerid, seconds)
{
    TogglePlayerControllable(playerid, 0);
    new rand = random(3);
    switch(rand)
    {
        case 0: SetPlayerPos(playerid, 262.9825,77.4500,1001.0391);
        case 1: SetPlayerPos(playerid, 193.6294,161.8236,1003.2417);
        case 2: SetPlayerPos(playerid, 190.8504,161.0375,1003.2417);
    }
    SetPlayerInterior(playerid, 7);
    GameTextForPlayer(playerid, "~r~JAILED", 3000, 6);
    PlayerInfo[playerid][pJailed] = 1;
    PlayerInfo[playerid][pJailSeconds] = seconds * 1000;
    print(PlayerInfo[playerid][pJailSeconds]);
    new String[70];
    format(String, sizeof(String), "%s (ID: %d) has been jailed.", ReturnPlayerName(playerid), playerid);
    SendClientMessageToAll(COLOR_YELLOW, String);
    TogglePlayerControllable(playerid, 1);
    SetTimerEx("UnjailPlayer", PlayerInfo[playerid][pJailSeconds], false, "d", playerid);
    return 1;
}
forward UnjailPlayer(playerid);
public UnjailPlayer(playerid)
{
    ReleasePlayer(playerid);
    return 1;
}
Reply


Messages In This Thread
Jail system - by Isolated - 23.09.2013, 19:10
Re: Jail system - by Vrag - 23.09.2013, 19:23
Re: Jail system - by Isolated - 23.09.2013, 19:27
Re: Jail system - by Dragonsaurus - 23.09.2013, 19:34
Re: Jail system - by Isolated - 23.09.2013, 19:40
Re: Jail system - by Dragonsaurus - 23.09.2013, 19:41
Re: Jail system - by Isolated - 23.09.2013, 20:11
Re: Jail system - by Isolated - 24.09.2013, 14:33
Re: Jail system - by RajatPawar - 24.09.2013, 16:01
Re: Jail system - by Isolated - 24.09.2013, 18:55

Forum Jump:


Users browsing this thread: 1 Guest(s)