Jump to content

Help me important thing.


DonOmar

Recommended Posts

what about this ?

addEventHandler("onPlayerTarget",root,function(target)  
if(getElementType(target)=="player")then  
    if(getTeamName(getPlayerTeam(target))=="Police")then  
        setPlayerWantedLevel(source,1)  
    end 
end) 

Link to comment
    addEventHandler("onPlayerTarget",root,function(target) 
    if(getElementType(target)=="player")then 
        if(getTeamName(getPlayerTeam(target))=="Police")then 
            setPlayerWantedLevel(source,getPlayerWantedLevel(source)+1) 
        end 
    end 
end) 

Link to comment

Could have specified that in the original post maybe.

  
addEventHandler("onPlayerTarget",root,function(target) 
        if(getElementType(target)=="player")then 
            if(getTeamName(getPlayerTeam(target))=="Police")then 
             local x,y,z = getElementPosition(source) 
            if getZoneName ( x, y, z, true ) == "Los Santos"  or getZoneName ( x, y, z, true ) == "San Fierro" then 
            local slot = getPedWeaponSlot (source) 
                if slot ~= 1 and slot ~= 0 then 
                setPlayerWantedLevel(source,getPlayerWantedLevel(source)+1) 
                end 
            end 
        end 
    end 
end) 

Any ways if you need anything else --

https://wiki.multitheftauto.com/wiki/Sc ... troduction

Try searching up the functions and what not before you ask here, that's a very simple code to do.

/debugscript 3 to find errors.

Link to comment

Bro its working but i want it just when i aim with weapon .the code that u gave me is giving WL when looking to a cop without aim also i wanna make it +1 WL every 5sec of aiming iam just learning lua from some months and iam improving me self but i tried too much times with this code and still bugged. Help plz

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...