Desaster Posted September 27, 2013 Posted September 27, 2013 this is the beginning of a script i am posting it for my friend I can't find why it don't work local createTeam ( "farmer", 0, 255, 0 ) local Marker = createMarker ( 670.69952392578, 906.75018310547, -40.3984375, "cylinder", 1, 255, 255, 255, 0 ) local Elem = createObject ( 3409, 670.69952392578, 906.75018310547, -40.3984375, 90, 0, 0 ) function onmarkethit() if ( weapon == 23 ) then destroyElement ( Elem ) destroyElement ( Marker ) givePlayerMoney ( source, 5000 ) end else end
Castillo Posted September 27, 2013 Posted September 27, 2013 Because it doesn't make any sense. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
xXMADEXx Posted September 27, 2013 Posted September 27, 2013 createTeam ( "farmer", 0, 255, 0 ) local Marker = createMarker ( 670.69952392578, 906.75018310547, -40.3984375, "cylinder", 1, 255, 255, 255, 0 ) local Elem = createObject ( 3409, 670.69952392578, 906.75018310547, -40.3984375, 90, 0, 0 ) function onmarkethit ( p ) if ( weapon == 23 ) then if ( isElement ( Elem ) ) then destroyElement ( Elem ) end if ( isElement ( Marker ) ) then destroyElement ( Marker ) end givePlayerMoney ( p, 5000 ) end end addEventHandler ( "onMarkerHit", Marker onmarkerhit ) The Ultimate Lua Tutorial! | MTA PHP SDK
Castillo Posted September 27, 2013 Posted September 27, 2013 'weapon' is not defined anywhere. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
glowdemon1 Posted September 27, 2013 Posted September 27, 2013 createTeam ( "farmer", 0, 255, 0 ) local Marker = createMarker ( 670.69952392578, 906.75018310547, -40.3984375, "cylinder", 1, 255, 255, 255, 0 ) local Elem = createObject ( 3409, 670.69952392578, 906.75018310547, -40.3984375, 90, 0, 0 ) function customOnMarkerHit( p ) local playerWeapon = getPedWeapon( p ) if ( playerWeapon == 23 ) then if ( isElement ( Elem ) ) then destroyElement ( Elem ) end if ( isElement ( Marker ) ) then destroyElement ( Marker ) end givePlayerMoney ( p, 5000 ) end end addEventHandler ( "onMarkerHit", Marker, customOnMarkerHit) Should work. MySQL based MP3 System - unique radio stations My mappings
TAPL Posted September 27, 2013 Posted September 27, 2013 This function also should be used. getElementType
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