Jump to content

Wanted event


Estevam2d

Recommended Posts

  
addEvent("wanted",true) 
addEventHandler("wanted",root, 
    function(weapon) 
        if weapon == 43 and getElementType(source)=="player" then 
            if getPlayerTeam(source) == getTeamFromName("Bandido") then 
                setPlayerWantedLevel(source, 1) 
                end 
            end 
        end 
    end 
) 
  

not sure.

Link to comment

not worked

I took a photo of the criminal and he does not get star

I took a final, you put one more.

Client:

function onClientPlayerWeaponFireFunc(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) 
if getPlayerTeam(hitElement) == getTeamFromName("Bandido") then 
    if weapon == 43 and getElementType(hitElement)=="player" then  
         triggerServerEvent ( "wanted", localPlayer ) 
         end 
    end 
end 
addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer(), onClientPlayerWeaponFireFunc ) 
  

Server:

addEvent("wanted",true) 
addEventHandler("wanted",root, 
    function(weapon) 
        if weapon == 43 and getElementType(source)=="player" then 
            if getPlayerTeam(source) == getTeamFromName("Bandido") then 
                setPlayerWantedLevel(source, 1) 
            end 
        end 
    end 
) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...