/prison(jail)
#6

PHP код:
CMD:prison(playeridparams[]) {
    if(
PlayerInfo[playerid][pAdmin] >= 3) {
        if(
AdminDuty[playerid] != && PlayerInfo[playerid][pAdmin] < 6)
            return 
SendClientMessage(playerid,COLOR_WHITE"You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
        new 
string[128], giveplayeridminutesreason[64];
        if(
sscanf(params"uds[64]"giveplayeridminutesreason)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /prison [playerid/partofname] [minutes] [reason]");
        if(
IsPlayerConnected(giveplayerid))
        {
            if(
PlayerInfo[giveplayerid][pAdmin] >= PlayerInfo[playerid][pAdmin] && AdminDuty[giveplayerid] == 1)
            {
                
SendClientMessage(playeridCOLOR_WHITE"You can't perform this action on an equal or higher level admin that is on-duty.");
                return 
1;
            }
            
SetPlayerArmedWeapon(giveplayerid0);
            
/*if(GetPVarInt(giveplayerid, "PBM") > 0)
            {
                LeavePaintballArena(giveplayerid, GetPVarInt(giveplayerid, "IsInArena"));
            }*/
            
GameTextForPlayer(giveplayerid"~w~Welcome to ~n~~r~Admin Prison"50003);
            
ResetPlayerWeaponsEx(giveplayerid);
            
format(stringsizeof(string), "AdmCmd: %s has been prisoned by %s, reason: %s"GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason);
            
Log("logs/admin.log"string);
            
format(stringsizeof(string), "AdmCmd: %s has been prisoned by %s, reason: %s"GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason);
            
SendClientMessageToAllEx(COLOR_LIGHTREDstring);
            if(
PlayerDraggedBy[giveplayerid] != INVALID_PLAYER_ID) {
                
IsCopDragging[PlayerDraggedBy[giveplayerid]] = INVALID_PLAYER_ID;
                
PlayerDragged[giveplayerid] = 0;
                
PlayerDraggedBy[giveplayerid] = INVALID_PLAYER_ID;
            }
            
PlayerInfo[giveplayerid][pWantedLevel] = 0;
            
SetPlayerWantedLevel(giveplayerid0);
            
PlayerInfo[giveplayerid][pJailed] = 3;
            
PlayerInfo[giveplayerid][pJailTime] = minutes*60;
            if(
IsPlayerAttachedObjectSlotUsed(giveplayerid0))
                
RemovePlayerAttachedObject(giveplayerid0);
            
format(PlayerInfo[giveplayerid][pPrisonReason], 128"%s"reason);
            
format(PlayerInfo[giveplayerid][pPrisonedBy], MAX_PLAYER_NAME"%s"GetPlayerNameEx(playerid));
            
PhoneOnline[giveplayerid] = 1;
            
TogglePlayerControllable(giveplayerid0);
            for(new 
06o++)
            {
                
TextDrawShowForPlayer(giveplayeridObjectsLoadingTD[o]);
            }
            
SetPVarInt(giveplayerid"LoadingObjects"1);
               
SetTimerEx("SafeLoadObjects"30000"d"giveplayerid);
            
SetPlayerInterior(giveplayerid69);
            
PlayerInfo[giveplayerid][pVW] = 696969;
            
PlayerInfo[giveplayerid][pInt] = 69;
            
SetPlayerVirtualWorld(giveplayerid696969);
            new 
rand random(sizeof(AdminPrisonFloat));
            
SetPlayerPos(giveplayeridAdminPrisonFloat[rand][0], AdminPrisonFloat[rand][1], AdminPrisonFloat[rand][2]);
            
SetPlayerSkin(giveplayerid50);
            
SetPlayerColor(giveplayeridTEAM_APRISON_COLOR);
        }
    }
    else
    {
        
SendClientMessage(playeridCOLOR_GRAD1"You're not authorized to use that command!");
    }
    return 
1;

Just change the admin ranks to whatever your ranks are.
Reply


Messages In This Thread
/prison(jail) - by DaniceMcHarley - 18.02.2014, 17:20
Re: /prison(jail) - by BigGroter - 18.02.2014, 17:26
Re: /prison(jail) - by park4bmx - 18.02.2014, 17:58
Re: /prison(jail) - by DaniceMcHarley - 18.02.2014, 18:35
Re: /prison(jail) - by BigGroter - 18.02.2014, 18:54
Re: /prison(jail) - by Ryan McDuff - 19.02.2014, 03:28
Re: /prison(jail) - by GamemodeRP123 - 19.02.2014, 04:53
Re: /prison(jail) - by itsCody - 19.02.2014, 05:49

Forum Jump:


Users browsing this thread: 1 Guest(s)