block commands in jail help
#1

I need players in jail can not use any kind of commands I have this thanks


Код:
CMD:jail(playerid, params[])
{
 if(Player[playerid][Level] < 1) return SendClientMessage(playerid,-1,"{FFFFFF}Error: {0099FF}only level 1.");
 new string[128], Jugador[MAX_PLAYER_NAME], AdminJ[MAX_PLAYER_NAME];
 if(sscanf(params, "ui", params[0], params[1])) return SendClientMessage(playerid, -1, "Use: /Jail [id] [minutes]");
 if(IsPlayerConnected(params[0]))
 {
 SetPlayerPos(params[0], my cordinates xxx);
 ResetPlayerWeapons(playerid);
 SetPlayerVirtualWorld(params[0], 0);
 JailTiempo[params[0]] = SetTimer("Libre", params[1]*60*1000, false);
 JailSi[params[0]] = 1;
 GetPlayerName(playerid, AdminJ, sizeof(AdminJ));
 GetPlayerName(params[0], Jugador, sizeof(Jugador));
 format(string, sizeof(string), "- admi %s jailed to %s por %i minute.", AdminJ, Jugador, params[1]);
 SendClientMessageToAll(-1, string);
 }
 else SendClientMessage(playerid, -1, "player no online.");
 return 1;
}
//------------------------------------------------------------------------------
CMD:unjail(playerid, params[])
{
 new string1[128], Jugador1[MAX_PLAYER_NAME];
 if(sscanf(params, "u", params[0])) return SendClientMessage(playerid, -1, "Use: /UnJail [id]");
 if(IsPlayerConnected(params[0]))
 {
 if(JailSi[params[0]] == 0) return SendClientMessage(playerid, -1, "player is in jail.");
 SpawnPlayer(params[0]);
 SetPlayerInterior(params[0], 0);
 SetPlayerVirtualWorld(params[0], 0);
 KillTimer(JailTiempo[params[0]]);
 JailSi[playerid] = 0;
 GetPlayerName(params[0], Jugador1, sizeof(Jugador1));
 format(string1, sizeof(string1), "Liberaste a %s", params[0]);
 SendClientMessage(playerid, -1, string1);
 GameTextForPlayer(params[0], "~g~unjailed by admi", 5000, 4);
 PlayerPlaySound(params[0], 1057, 0.0, 0.0, 0.0);
 }
 else SendClientMessage(playerid, -1, "player no online.");
 return 1;
}
forward Libre(playerid);
public Libre(playerid)
{
  SpawnPlayer(playerid);
  SetPlayerInterior(playerid, 0);
  SetPlayerVirtualWorld(playerid, 0);
  KillTimer(JailTiempo[playerid]);
  JailSi[playerid] = 0;
  GameTextForPlayer(playerid, "~g~Descarcelado", 5000, 4);
  PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
}
Reply


Messages In This Thread
block commands in jail help - by vegaltasendai - 09.09.2017, 19:26
Re: block commands in jail help - by alanhutch - 09.09.2017, 19:38
Re: block commands in jail help - by AmarPlayer - 09.09.2017, 19:41
Re: block commands in jail help - by vegaltasendai - 09.09.2017, 20:03
Re: block commands in jail help - by BadJih - 09.09.2017, 20:42
Re: block commands in jail help - by BadJih - 09.09.2017, 20:46

Forum Jump:


Users browsing this thread: 2 Guest(s)