/ajail help.
#8

Quote:
Originally Posted by SilencedPistol
Посмотреть сообщение
Okay, so I'd like an /ajail command that is usable by level 1 administrators in my server.

USAGE: /ajail [playerid] [time] [reason]

I have tried to do this, but it doesn't seem to work. I would also like them to teleport to these co-ordinates when I type it:

1814.8334,3246.8838,3.0369,125.6988,0,0,0,0,0,0);

A also need an /arelease [playerid] which will teleport them to Unity Station.
Do you also need a coffee, a pizza or a hotdog? Jk.

pawn Код:
CMD:jail(playerid, params[])
{
    if(pAdminLevel[playerid] == 1)
    {
    new id,time,reason[128],PlayerName[MAX_PLAYER_NAME],GPlayerName[MAX_PLAYER_NAME];
    if(sscanf(params,"uds[128]",id,time,reason)) return SCM(playerid, -1, "{F70505}Usage: {FFFFFF}/jail <playerid> <time in minutes> <reason>");
    if(!IsPlayerConnected(id)) return SCM(playerid, red, "ERROR: Player is not connected.");
    if(time < 0 || time > 1000)return SCM(playerid,0xff0000FF,"Error: Max jail time: 1000 minutes - Min: 1.");
    GetPlayerName(id, PlayerName, sizeof(PlayerName));
    GetPlayerName(playerid, GPlayerName, sizeof(GPlayerName));
    new szString[200];
    format(szString, sizeof(szString), "** Admin %s (%d) has jailed %s (%d) for %d minutes. Reason: %s", GPlayerName,playerid,PlayerName,id,time,reason);
    SendClientMessageToAll(pink, szString);
    SetPlayerPos(id, 1814.8334,3246.8838,3.0369,125.6988); //Fix your coordinates. Must be X, Y, Z.
    JailTimer[id] = SetTimerEx("Unjail",time*60000, false, "i", id);
    }
    return 1;
}

//On top:
forward Unjail(playerid);
new JailTimer[MAX_PLAYERS];

public Unjail(playerid)
{
  SetPlayerInterior(playerid, 0);
  SetPlayerVirtualWorld(playerid, 0);
  KillTimer(JailTimer[playerid]);
  SetPlayerPos(playerid,YOUR_COORDINATES);
  return 1;
}
Reply


Messages In This Thread
/ajail help. - by SilencedPistol - 04.04.2013, 19:10
Re: /ajail help. - by EliteApple - 04.04.2013, 19:22
Re: /ajail help. - by SilencedPistol - 04.04.2013, 19:26
Re: /ajail help. - by EliteApple - 04.04.2013, 19:31
Re: /ajail help. - by SilencedPistol - 04.04.2013, 19:36
Re: /ajail help. - by EliteApple - 04.04.2013, 19:39
Re: /ajail help. - by BigGroter - 04.04.2013, 20:10
Re: /ajail help. - by Face9000 - 04.04.2013, 22:48

Forum Jump:


Users browsing this thread: 1 Guest(s)