Miika Posted July 3, 2014 Posted July 3, 2014 My resource not working... local amark = { {1667.2,1014.3,10.8}, } function createMarker() local random = math.random ( #amark ) local x, y, z = amark[random][1] Marker = createMarker ( x, y, z "cylinder", 4, 255, 255, 0, 170 ) setElementCollisionsEnabled( Marker, false ) bl = createBlipAttachedTo(Marker,11) outputChatBox( "Autokaupan ryöstö on saatavilla! Ryöstä se keltaisen rekan luota.", root, 0, 255, 0 ) end addEventHandler("onResourceStart", resourceRoot,createMarker) addEventHandler("onMarkerHit",root, function ( player ) if ( source ~= Marker ) then return end if ( isPedInVehicle( player ) ) then return end destroyElement( Marker ) destroyElement( bl ) randomMoney = math.random ( 3000, 5000 ) givePlayerMoney(player,randomMoney) setPlayerWantedLevel ( player, 6 ) outputChatBox("Sait $" .. tostring(randomMoney) .." rahaa ja 6 tähteä", player, 0, 250, 0) setTimer( createMarker, 900000, 1 ) end ) Sorry my bad english D: Real motorbike backflip / frontflip script: https://forum.mtasa.com/viewtopic.php?f=108&t=98191
MIKI785 Posted July 3, 2014 Posted July 3, 2014 What about debug? Saying that it doesn't work isn't enough.. Lua Scripter Owner of mshost.cz MTA portal.
MTA Team botder Posted July 3, 2014 MTA Team Posted July 3, 2014 function createMarker() Change the name from your function because it overwrites the original MTA function. GitHub: Debug Console • MTA-Discord Relay Scripting: How to draw a line chart with DirectX functions? • Doppler Effect in MTA • Get the client's FPS • Customizable Blur Shader
Miika Posted July 3, 2014 Author Posted July 3, 2014 What about debug? Saying that it doesn't work isn't enough.. I want make "rob the car shop" resource. Real motorbike backflip / frontflip script: https://forum.mtasa.com/viewtopic.php?f=108&t=98191
Miika Posted July 3, 2014 Author Posted July 3, 2014 function createMarker() Change the name from your function because it overwrites the original MTA function. I change the function, but not working... local amark = { {1667.2,1014.3,10.8}, } function createRob() local random = math.random ( #amark ) local x, y, z = amark[random][1] Marker = createMarker ( x, y, z "cylinder", 4, 255, 255, 0, 170 ) setElementCollisionsEnabled( Marker, false ) bl = createBlipAttachedTo(Marker,11) outputChatBox( "Autokaupan ryöstö on saatavilla! Ryöstä se keltaisen rekan luota.", root, 0, 255, 0 ) end addEventHandler("onResourceStart", resourceRoot,createRob) addEventHandler("onMarkerHit",root, function ( player ) if ( source ~= Marker ) then return end if ( isPedInVehicle( player ) ) then return end destroyElement( Marker ) destroyElement( bl ) randomMoney = math.random ( 3000, 5000 ) givePlayerMoney(player,randomMoney) setPlayerWantedLevel ( player, 6 ) outputChatBox("Sait $" .. tostring(randomMoney) .." rahaa ja 6 tähteä", player, 0, 250, 0) setTimer( createMarker, 900000, 1 ) end ) Real motorbike backflip / frontflip script: https://forum.mtasa.com/viewtopic.php?f=108&t=98191
_DrXenon Posted July 3, 2014 Posted July 3, 2014 x,y,z = amark[random][1],amark[random][2],amark[random][3] That will fix it ●●● Rage Gaming Society Coming Soon ●●●
Et-win Posted July 3, 2014 Posted July 3, 2014 setTimer( createMarker, 900000, 1 ) You forgot to change that too btw. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
_DrXenon Posted July 3, 2014 Posted July 3, 2014 As function name was changed, it should be: SetTimer(createRob,900000,1) ●●● Rage Gaming Society Coming Soon ●●●
Miika Posted July 3, 2014 Author Posted July 3, 2014 x,y,z = amark[random][1],amark[random][2],amark[random][3]That will fix it Thx! It working! Real motorbike backflip / frontflip script: https://forum.mtasa.com/viewtopic.php?f=108&t=98191
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