Need Cmd Uninviteall
#1

hi... bro, can help me? i need cmd /ouninviteall, for uninvite all players from factions.

PHP код:
CMD:ouninvite(playeridparams[]) {
    if (
PlayerInfo[playerid][pLeader] >= || PlayerInfo[playerid][pAdmin] >= 7) {
        if(
isnull(params)) {
            return 
SendClientMessageEx(playeridCOLOR_WHITE"USAGE: /uninvite [name]");
        }
        if(!
doesAccountExist(params)) {
            return 
SendClientMessageEx(playeridCOLOR_WHITE"That account does not exist!");
        }
        
OnPlayerOfflineLogin(params);
        if(
PlayerInfo[MAX_PLAYERS][pAdmin] >= || PlayerInfo[MAX_PLAYERS][pFactionModerator] == 1) {
            return 
SendClientMessageEx(playeridCOLOR_WHITE"You can not uninvite this person.");
        }
        else if ((
PlayerInfo[MAX_PLAYERS][pMember] == PlayerInfo[playerid][pLeader]) && (PlayerInfo[MAX_PLAYERS][pLeader] == || PlayerInfo[MAX_PLAYERS][pRank] < PlayerInfo[playerid][pRank])) {
            
PlayerInfo[MAX_PLAYERS][pMember] = 0;
            
PlayerInfo[MAX_PLAYERS][pRank] = 0;
            
PlayerInfo[MAX_PLAYERS][pChar] = 0;
            
PlayerInfo[MAX_PLAYERS][pDuty] = 0;
            
PlayerInfo[MAX_PLAYERS][pLeader] = 0;
            if(!
IsValidSkin(PlayerInfo[MAX_PLAYERS][pModel])) {
                
PlayerInfo[MAX_PLAYERS][pModel] = CIV[random(sizeof(CIV))];
            }
            if(
PlayerInfo[MAX_PLAYERS][pDonateRank] < 3) for(new iToyIteriToyIter MAX_PLAYER_ATTACHED_OBJECTS; ++iToyIter) {
                for(new 
LoopRapistLoopRapist sizeof(HoldingObjectsCop); ++LoopRapist) {
                    if(
HoldingObjectsCop[LoopRapist][holdingmodelid] == PlayerToyInfo[MAX_PLAYERS][iToyIter][ptModelID]) {
                        
PlayerToyInfo[MAX_PLAYERS][iToyIter][ptModelID] = 0;
                        
PlayerToyInfo[MAX_PLAYERS][iToyIter][ptBone] = 0;
                        
PlayerToyInfo[MAX_PLAYERS][iToyIter][ptPosX] = 0.0;
                        
PlayerToyInfo[MAX_PLAYERS][iToyIter][ptPosY] = 0.0;
                        
PlayerToyInfo[MAX_PLAYERS][iToyIter][ptPosZ] = 0.0;
                        
PlayerToyInfo[MAX_PLAYERS][iToyIter][ptPosX] = 0.0;
                        
PlayerToyInfo[MAX_PLAYERS][iToyIter][ptPosY] = 0.0;
                        
PlayerToyInfo[MAX_PLAYERS][iToyIter][ptPosZ] = 0.0;
                    }
                }
            }
            new
                
szMessage[36 MAX_PLAYER_NAME];
            
format(szMessagesizeof(szMessage), "You have kicked %s from the faction."params);
            
SendClientMessageEx(playeridCOLOR_LIGHTBLUEszMessage);
            
OnPlayerOfflineSave(params);
        }
        else 
SendClientMessageEx(playeridCOLOR_WHITE"That player can not be uninvited by you.");
    }
    else 
SendClientMessageEx(playeridCOLOR_GRAD1"You are not authorized to use that command - only leaders can do this.");
    return 
1;

Reply


Messages In This Thread
Need Cmd Uninviteall - by DandyCorleone - 01.01.2017, 07:20
Re: Need Cmd Uninviteall - by iLearner - 01.01.2017, 08:22
Re: Need Cmd Uninviteall - by DandyCorleone - 01.01.2017, 08:41

Forum Jump:


Users browsing this thread: 2 Guest(s)