Jump to content

Marker Money Help


xXMADEXx

Recommended Posts

Posted

Hey guys, i am making a marker. I would like it to be when somone walks in it they will get money. I have been working on this for ever (like an hour) and i just cant figure this damn script out. So i decided someone from MTA forums could figure it out. If you can please do it. This is the script i currently have (server side):

  
marker = createMarker ( 2513.4299316406,-1671.6391601563,12.6, "cylinder", 1.5, 255, 0, 0, 170 ) 
  
function lol ( thePlayer ) 
    setMoney ( 90000 ) 
end 
addEventHandler ( "onMarkerHit", getRootElement(), lol ) 
  

Posted

okey, that makes since but it still isnt working. This is the script i have right now (server side):

marker = createMarker ( 2513.4299316406,-1671.6391601563,12.6, "cylinder", 1.5, 255, 0, 0, 170 ) 
  
function lol ( thePlayer ) 
    givePlayerMoney ( 99999 ) 
end 
addEventHandler ( "onMarkerHit", getRootElement(), lol ) 

Posted
okey, that makes since but it still isnt working. This is the script i have right now (server side):

marker = createMarker ( 2513.4299316406,-1671.6391601563,12.6, "cylinder", 1.5, 255, 0, 0, 170 ) 
  
function lol ( thePlayer ) 
    givePlayerMoney ( 99999 ) 
end 
addEventHandler ( "onMarkerHit", getRootElement(), lol ) 

Is it that hard to go to the link I posted and check the function arguments?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
THANK YOU SO MUCH!!!!

Notice that you need two arguments for givePlayerMoney

Argument #1: Player who will get the money

Argument #2: Positive quantity

givePlayerMoney(getPlayerFromName("Solidsnake14"), 1000) would give Solidsnake14 $1000

Posted

Also.. you have getRootElement() instead of the marker name. Meaning ALL markers are triggering the function 'lol'.

If I helped you, please click the like button on the right ;) Thanks!

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