/makeleader [id] [faction name] | /jail command
#3

pawn Код:
dcmd_jail(playerid, params[])
{
    if (strlen(params))
    {
        new time,
            Pos[3];
        id = strval(params[0]);
        time = strval(params[1]);
        GetPlayerPos(id, Pos[0], Pos[1], Pos[2]);
        if (IsPlayerConnected(id))
        {
            if(Army[playerid] == 1 || Swat[playerid] == 1 || Cop[playerid] == 1 || Ss[playerid] == 1) && if(IsPlayerInRangeOfPoint(playerid,7.0,Pos[0], Pos[1], Pos[2])
            {
                new string[265];
                GetPlayerPos(playerid,Pos[0], Pos[1], Pos[2]);
                SetPlayerPos(id,Pos[0], Pos[1], Pos[2]);
                SetTimer("jail",time+000,0);
                format(string,sizeof(string),"Jail:You got jailed for %s ",time);
                SendClientMessage(id,0x00FF00AA,string);
            }
            else
            {
                SendClientMessage(playerid,0xFF0000AA,"You dont have permission for this commands");
            }
        }
        else
        {
            SendClientMessage(playerid, 0xFF0000AA, "Player not found");
        }
    }
    else
    {
        SendClientMessage(playerid, 0xFF0000AA, "Usage: /jail <playerid> <seconds>");
    }
    return 1;
}
Now the player using the /jail command has to be within 7(meters?) of the player.
Reply


Messages In This Thread
/makeleader [id] [faction name] | /jail command - by DaRealz - 22.06.2011, 20:33
Re: /makeleader [id] [faction name] | /jail command - by ZBits - 06.07.2012, 00:30
Re: /makeleader [id] [faction name] | /jail command - by SnG.Scot_MisCuDI - 06.07.2012, 00:46

Forum Jump:


Users browsing this thread: 2 Guest(s)