Help with my Jail command
#1

Howdy Folks, I came here with a question about my Jail command that i am Completely Stumped about.

Here is the /jail Command.
pawn Код:
CMD:jail(playerid,params[])
{
    if(PlayerInfo[playerid][pAdmin] >=5)
    {
        new id,reason[128],time,on[MAX_PLAYER_NAME],n[MAX_PLAYER_NAME],string[128];
        if(sscanf(params,"uds[128]",id,time,reason)) return SendClientMessage(playerid,COLOR_RED,"Usage:/Jail [ID] [Time] [Reason]");
        if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "System: Invalid ID");
        else
        {
            GetPlayerName(playerid,n,sizeof(n));
            GetPlayerName(id,on,sizeof(on));
            SetPlayerPos(id,227.69999694824,109,999.09997558594);
            PlayerInfo[id][pJailTime] = time;
            PlayerInfo[id][pJail] = 1;
            SetPlayerInterior(id,10);
            SetPlayerVirtualWorld(id, 2);
            JailTime[id] = SetTimer("JailTime", time, false);
            format(string, sizeof(string), "AdminCMD: %s has Jailed %s because: %s",n,on,reason);
            SendClientMessageToAll(COLOR_ORANGE,string);
        }
    }
    return 1;
}
Heres the Unjail part of the Timer.



pawn Код:
new JailTime[MAX_PLAYERS];
pawn Код:
forward Jailtime(playerid);
public Jailtime(playerid)
{
    SetPlayerPos(playerid,1552.4500,-1674.9900,16.1953);
    PlayerInfo[playerid][pJail] = 0;
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    SendClientMessage(playerid,COLOR_RED,"You Were Released From Admin Jail");
    return 1;
}
Reply


Messages In This Thread
Help with my Jail command - by Shockey HD - 30.11.2011, 21:45
Re: Help with my Jail command - by [MG]Dimi - 30.11.2011, 21:59
Re: Help with my Jail command - by Shockey HD - 30.11.2011, 22:10
Re: Help with my Jail command - by grand.Theft.Otto - 30.11.2011, 22:38
Re: Help with my Jail command - by Shockey HD - 30.11.2011, 23:51
Re: Help with my Jail command - by grand.Theft.Otto - 01.12.2011, 00:33
Re: Help with my Jail command - by Shockey HD - 01.12.2011, 01:01
Re: Help with my Jail command - by Rob_Maate - 01.12.2011, 03:12

Forum Jump:


Users browsing this thread: 3 Guest(s)