Jump to content

Help me important thing.


DonOmar

Recommended Posts

Posted

Today, i wanna ask for a script which gives Wanted Level when aiming at cop i mean when Criminal or any other Occ aiming at cop he will get Wanted Level.

560x95_FFFFFF_FF9900_000000_000000.png

Posted

All What you need is

-- Function 
getElementType() 
getPlayerTeam() 
getTeamName() 
  
-- Events 
"onPlayerTarget" 

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
anyone help please ?

Do it by yourself and post your code here.

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted

what about this ?

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

560x95_FFFFFF_FF9900_000000_000000.png

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

Wolf Inc Discord

Youtube channel
Github

Posted

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.

Wolf Inc Discord

Youtube channel
Github

Posted

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

560x95_FFFFFF_FF9900_000000_000000.png

Posted

i think

getElementZoneName 

works better than

getZoneName 

i tried it before, and getElementZoneName works better for some reason. lol

Aftermath

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