Jail CMD please +Rep
#2

PHP код:
CMD:jail(playeridparams[])
{
    new 
id;
    if(
IsPlayerConnected(id))
    {
        if(
PlayerInfo[playerid][pAdmin] >= 1)
        {
            if(!
sscanf(params"u"id))
            {
                new 
string[64];
                
format(stringsizeof(string), "You have been jailed by %s."PlayerName(playerid));
                
SendClientMessage(id0xD8D8D8FFstring);
                
format(stringsizeof(string), "You jailed %s ."PlayerName(id));
                
SendClientMessage(playerid0xD8D8D8FFstring);
                
SetPlayerPos(id264.5442199707,77.155387878418,1001.0390625);
                
SetPlayerInterior(id6);
                return 
true;
            }
            else return 
SendClientMessage(playerid0xD8D8D8FF"USAGE: /jail [PlayerId/PartOfName]");
        }
        else return 
SendClientMessage(playeridCOLOR_RED"You are not allowed to use this command.");
    }
    else return 
SendClientMessage(playerid0xD8D8D8FF"Player is not connected.");

PHP код:
CMD:unjail(playeridparams[])
{
    new 
id;
    if(
IsPlayerConnected(id))
    {
        if(
PlayerInfo[playerid][pAdmin] >= 1)
        {
            if(!
sscanf(params"u"id))
            {
                new 
string[64];
                
format(stringsizeof(string), "You have been unjailed by %s."PlayerName(playerid));
                
SendClientMessage(id0xD8D8D8FFstring);
                
format(stringsizeof(string), "You unjailed %s ."PlayerName(id));
                
SendClientMessage(playerid0xD8D8D8FFstring);
                
SetPlayerPos(id1552.1305,-1675.6511,16.1554);
                
SetPlayerInterior(id0);
                return 
true;
               }
            else return 
SendClientMessage(playerid0xD8D8D8FF"USAGE: /unjail [PlayerId/PartOfName]");
        }
        else return 
SendClientMessage(playeridCOLOR_RED"You are not allowed to use this command.");
    }
    else return 
SendClientMessage(playerid0xD8D8D8FF"Player is not connected.");

rep for help and change colors becose maybe it will give you error if you wont !

EDIT:forgot stock PlayerName
PHP код:
stock PlayerName(playerid)
{
    new 
Name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridNamesizeof(Name));
    return 
Name;

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: 1 Guest(s)