#1

Hi Guys i want Counvert two Cmds (/jail /mute) it's /jail id Min reason and same for Mute
i Don't want Min i want Second any 1 can Convert it please
PHP код:
CMD:jail(playerid,params[])
{
    if(
PlayerInfo[playerid][Admin] < 2) return SendClientMessage(playeridCOLOR_RED"You need to be level 3 to use this command!");
    {
        new 
pIdtime;
        if(
sscanf(params"dds"pIdtimeparams[3])) return SendClientMessage(playeridCOLOR_RED"Usage: /jail (ID) (Time In Minuets) (Reason)");
        else if(!
IsPlayerConnected(pId)) return SendClientMessage(playeridCOLOR_RED"Invalid ID");
        else if(
PlayerInfo[pId][Jailed] == 1) return SendClientMessage(playeridCOLOR_RED"Player is already in jail");
        else
        {
            new 
pname[MAX_PLAYER_NAME], jname[MAX_PLAYER_NAME], string1[250];
            
GetPlayerName(playeridpnamesizeof(pname));
            
GetPlayerName(pIdjnamesizeof(jname));
            
SetPlayerInterior(pId6);
            
SetPlayerVirtualWorld(pId10);
            
SetPlayerPos(pId264.1542,77.6009,1001.0391);
            
SetTimerEx("UnJail",time*1000*60,0,"i",pId);
            
ResetPlayerWeapons(pId);
            
PlayerInfo[pId][Jailed] = 1;
            
format(string1sizeof(string1), "Admin %s(%d) has  jailed you for %d minutes; Reason: %s"GetPlayerNameEx(playerid), pIdtimeparams);
            
SendClientMessage(pId,0x00D9ADFFstring1);
        }
    }
    return 
1;
}
CMD:mute playeridparams[] )
{
    if(
PlayerInfo[playerid][Admin] < 3) return SendClientMessage(playeridCOLOR_RED"You need to be level 3 to use this command!");
    {
        new 
pIdtime;
        if(
sscanf(params"dds"pIdtimeparams[3])) return SendClientMessage(playeridCOLOR_RED"Usage: /mute (ID) (Time In Minuets) (Reason)");
        else if(!
IsPlayerConnected(pId)) return SendClientMessage(playeridCOLOR_RED"Invalid ID");
        else if(
PlayerInfo[pId][Muted] == 1) return SendClientMessage(playeridCOLOR_RED"Player is already Muted");
        else
        {
            new 
pname[MAX_PLAYER_NAME], jname[MAX_PLAYER_NAME], string1[250];
            
GetPlayerName(playeridpnamesizeof(pname));
            
GetPlayerName(pIdjnamesizeof(jname));
            
SetTimerEx("UnMute",time*1000*60,0,"i",pId);
            
PlayerInfo[pId][Muted] = 1;
            
format(string1sizeof(string1), "Admin %s(%d) has  Muted you for %d minutes; Reason: %s"GetPlayerNameEx(playerid), pIdtimeparams);
            
SendClientMessage(pId,0x00D9ADFFstring1);
        }
    }
    return 
1;

Reply


Messages In This Thread
Help - by anassmaroc - 29.09.2015, 20:37
Re: Help - by PrO.GameR - 29.09.2015, 20:43
Re: Help - by Slawiii - 29.09.2015, 20:47
Re : Help - by anassmaroc - 29.09.2015, 21:20

Forum Jump:


Users browsing this thread: 2 Guest(s)