#3

Give it a try, if you meant playerid instead of faction in this line getFactionType(faction), then change it.
PHP код:
YCMD:find(playeridparams[], help) { 
    if(
help) { 
        
SendClientMessage(playeridX11_WHITE"LEO command for finding a player"); 
        return 
1
    } 
    if(
IsAnLEO(playerid) || (getFactionType(faction) == EFactionType_Hitman)) {             
        if(
IsOnDuty(playerid) || (getFactionType(faction) == EFactionType_Hitman)) { 
            if(
IsAtMDC(playerid)) { 
                new 
playa
                
/*new job = GetPVarInt(playerid, "Job"); 
                if(job != EJobType_Mercenary) { 
                    SendClientMessage(playerid, X11_TOMATO_2,"You must be a Mercenary"); 
                    return 1; 
                }*/ 
                
new time canUseMercCommand(playerid); 
                new 
msg[128]; 
                if(
time != 0) { 
                    
format(msgsizeof(msg), "You must wait %d seconds before continuing",time); 
                    
SendClientMessage(playeridX11_TOMATO_2msg); 
                    return 
1
                } 
                if(!
sscanf(params"k<playerLookup>"playa)) { 
                    if(!
IsPlayerConnectEx(playa)) { 
                        
SendClientMessage(playeridX11_TOMATO_2"User not found"); 
                        return 
1
                    } 
                    if(
GetPlayerState(playa) == PLAYER_STATE_SPECTATING || GetPlayerVirtualWorld(playa) != || GetPlayerInterior(playa) != || isTinFoiled(playa)) { 
                        
SendClientMessage(playeridX11_TOMATO_2"Could not locate player."); 
                        return 
1
                    } 
                    if(
EAdminFlags:GetPVarInt(playa"AdminFlags") & EAdminFlags_AdminManage) { 
                        
format(msgsizeof(msg), "%s has used /find on you.",GetPlayerNameEx(playeridENameType_RPName_NoMask)); 
                        
SendClientMessage(playaX11_ORANGEmsg); 
                    } 
                    new 
Float:XFloat:YFloat:Z
                    
GetPlayerPos(playaXYZ); 
                    
SetPlayerCheckpoint(playeridXYZ3.0); 
                    
SetTimerEx("RemoveCheckpoint"getMercCheckpointTimeout(playerid), false"d"playerid); 
                    
SetPVarInt(playerid"LastMercCommand"gettime()); 
                    
increaseJobPoints(playerid); 
                } else { 
                    
SendClientMessage(playeridX11_WHITE"USAGE: /find [playerid/name]"); 
                } 
                return 
1
            }
            return 
SendClientMessage(playeridX11_TOMATO_2"You are not on duty!"); 
        }
        return 
SendClientMessage(playeridX11_TOMATO_2"You aren't a cop!"); 
    }
    return 
1;

Reply


Messages In This Thread
Help - by Puff - 04.10.2017, 04:50
Re: Help - by raydx - 04.10.2017, 06:59
Re: Help - by frouzen - 04.10.2017, 09:24
Re: Help - by kAn3 - 04.10.2017, 13:28
Re: Help - by Puff - 06.10.2017, 12:39

Forum Jump:


Users browsing this thread: 1 Guest(s)