Jail CMD please +Rep
#6

Код:
CMD:jail(playerid,params[])
{
      if(PInfo[playerid][Level] >= 3 || IsPlayerAdmin(playerid))
      {
           new id;
           new jailedname[MAX_PLAYER_NAME];
           new adminname[MAX_PLAYER_NAME];
           if(sscanf(params,"u",id))return SendClientMessage(playerid,red,"Useage: /jail <playerid>");
           if(IsPlayerConnected(id))
           {
                  GetPlayerName(id,jailedname,sizeof(jailedname));
                  GetPlayerName(playerid,adminname,sizeof(adminname));
                  new string[256];
                  format(string,sizeof(string),"Administrator \"%s\" Has Jailed You",adminname);
                  SendClientMessage(id,blue,string);
                  format(string,sizeof(string),"You Have Jailed \"%s\"",jailedname);
                  SendClientMessage(playerid,blue,string);
                  SetPlayerPos(id, 264.5442199707,77.155387878418,1001.0390625); 
                  return SetPlayerInterior(id, 6);
          }
          else return SendClientMessage(playerid,red,"ERROR: Player Is Not connected");
    } 
    else return SendClientMessage(playerid,red,"ERROR: You are not a admin to use this command");
}
CMD:unjail(playerid,params[])
{
      if(PInfo[playerid][Level] >= 3 || IsPlayerAdmin(playerid))
      {
           new id;
           new unjailedname[MAX_PLAYER_NAME];
           new adminname[MAX_PLAYER_NAME];
           if(sscanf(params,"u",id))return SendClientMessage(playerid,red,"Useage: /unjail <playerid>"); 
     
           if(IsPlayerConnected(id))
           {
                  GetPlayerName(id,jailedname,sizeof(jailedname));
                  GetPlayerName(playerid,adminname,sizeof(adminname));
                  new string[256];
                  format(string,sizeof(string),"Administrator \"%s\" Has UnJailed You",adminname);
                  SendClientMessage(id,blue,string);
                  format(string,sizeof(string),"You Have Jailed \"%s\"",unjailedname);
                  SendClientMessage(playerid,blue,string);
                  return SpawnPlayer(id);
          }
          else return SendClientMessage(playerid,red,"ERROR: Player Is Not connected");
    } 
    else return SendClientMessage(playerid,red,"ERROR: You are not a admin to use this command");
}
Reply


Messages In This Thread
Jail CMD please +Rep - by Alexy_Dramon - 18.03.2012, 07:51
Re: Jail CMD please +Rep - by doreto - 18.03.2012, 07:58
Re: Jail CMD please +Rep - by Alexy_Dramon - 18.03.2012, 11:26
Re: Jail CMD please +Rep - by Mark™ - 18.03.2012, 11:42
Re: Jail CMD please +Rep - by Alexy_Dramon - 18.03.2012, 11:51
Re: Jail CMD please +Rep - by GAMER_PS2 - 18.03.2012, 12:06
Re: Jail CMD please +Rep - by Alexy_Dramon - 18.03.2012, 15:46

Forum Jump:


Users browsing this thread: 5 Guest(s)