xXMADEXx Posted October 23, 2012 Share Posted October 23, 2012 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 ) Link to comment
Castillo Posted October 23, 2012 Share Posted October 23, 2012 "setMoney" function doesn't exist, there is: setPlayerMoney and givePlayerMoney, you should use givePlayerMoney. Link to comment
xXMADEXx Posted October 23, 2012 Author Share Posted October 23, 2012 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 ) Link to comment
Renkon Posted October 23, 2012 Share Posted October 23, 2012 givePlayerMoney (thePlayer, 99999) Link to comment
xXMADEXx Posted October 23, 2012 Author Share Posted October 23, 2012 THANK YOU SO MUCH!!!! Link to comment
Castillo Posted October 23, 2012 Share Posted October 23, 2012 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? Link to comment
Renkon Posted October 23, 2012 Share Posted October 23, 2012 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 Link to comment
xXMADEXx Posted October 23, 2012 Author Share Posted October 23, 2012 Thank you castillo, and Renkon. You guys are pro's. Link to comment
myonlake Posted October 24, 2012 Share Posted October 24, 2012 Also.. you have getRootElement() instead of the marker name. Meaning ALL markers are triggering the function 'lol'. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now