Jump to content

I am new


Kostis

Recommended Posts

Hint: if you normally play Roleplay Servers, whenever you see a script, try to imagine (in your head) how you would do an equal. Try imagine the conditions (if/else), the variables... this will help you so much with the time.

here's an example:

if I point a gun at a police, then

I would get 1 star

done,

script now:

addEventHandler("onPlayerTarget",root,function(target) --When the player targets 
if(getElementType(target)=="player")then --get what they're pointing at and check if it's another player 
    if(getTeamName(getPlayerTeam(target))=="Police")then --get the the target(the player) team name, and if they're in the police team 
        setPlayerWantedLevel(source,1) --set their(the player that targeted) wanted level to 1 
    end 
end)--done 

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