Jump to content

S3M

Members
  • Posts

    64
  • Joined

  • Last visited

Everything posted by S3M

  1. hmm grrr I am angry at myself because I had not seen this option, i tried many options, but this option I've overlooked. Thx novo.
  2. Hi there, What is the reason that i dont see the "Can't jump right now" outputChatBox in chat when timer cooldown is on? Script is working fine, only i missed the message. cooldown = {} function createRamp ( player, command ) local vehicle = getPedOccupiedVehicle ( player ) if vehicle and not isTimer( cooldown[player] ) then local x, y, z = getElementPosition ( player ) local theVehicle = getPedOccupiedVehicle ( player ) local a,b,r = getVehicleRotation ( theVehicle ) x = x - math.sin ( math.rad(r) ) * 18 y = y + math.cos ( math.rad(r) ) * 18 ramp = createObject ( 3080, x, y, z, 0, 0, r ) setTimer(destroyElement, 5000, 1, ramp ) if isTimer( cooldown[player] ) then [color=#BF0000]outputChatBox( "Can't jump right now, wait few seconds then try again.", player, 255, 0, 0 ) [/color]else outputChatBox( "Jump set!!", player, 0, 255, 0 ) cooldown[player] = setTimer( function() end, 10000, 1 ) end end end addCommandHandler ( "r", createRamp ) addCommandHandler ( "j", createRamp ) Thx
  3. Last question do al player on the map hear this sound or only by whoopee car. it must be only around whoopy car. i think not on this way right?: Server: triggerClientEvent(root, 'Sound', root ) Client: addEvent('Sound', true) addEventHandler('Sound', root, function ( ) local sound = playSound("cash.mp3") setSoundVolume(sound, 0.5) setSoundMaxDistance(sound, 50) end) Thx.
  4. It work now with trigger to root, Thx again.
  5. This isnt posible with sound3D? Only Whoopee hears the cash sound not the player who buy. But it works. Thx Max+
  6. Thank you csmit195 (y) Now i try to setSound3D on sell/bought. I put the next line into but i hear nothing, how to?. What i do wrong? Server: addEvent ( 'TakeAndGive', true ) addEventHandler ( 'TakeAndGive', root , function ( ) local Driver = getVehicleController ( whoopieVehicle ) if ( Driver ) then givePlayerMoney ( Driver, 2 ) takePlayerMoney ( source, 2 ) [color=#FF0000] local x, y, z = getElementPosition(source)[/color] [color=#FF0000] triggerClientEvent ( "triggoncash", getRootElement(), "x, y, z" )[/color] setElementHealth ( source, getElementHealth ( source ) + 20 ) outputChatBox ( "You sell some Ice cream and earn 2$", Driver, 225, 225, 0 ) outputChatBox ( "You Bought an Ice cream of 2$", source, 225, 225, 0 ) else outputChatBox ( "Whoopee is not in his car, wait till he comes back", source, 225, 225, 0 ) end end ) Client: function onCash ( x, y, z ) local soundcash = playSound3D("cash.mp3", x, y, z, false) setSoundMaxDistance( soundcash,50 ) setSoundVolume(soundcash, 0.5) end addEvent( "triggoncasH", true ) addEventHandler( "triggoncasH", getRootElement(), onCash ) Meta: <file src="cash.mp3" /> Thx.
  7. Wauw SolidSnake14 it works... What can i say, BIG THX.. you want a kiss to? This makes me happy. Aaaah the code of Solidsnake14 are working, but i find a little problem. Wen player enter other car with other skin then he say: Sell ice cream to earn money. Thx. Sorry, i think i got fix the text for now. I use these lines from csmit195 added to Solidsnake14 code: 24.-- Only Mr.Whoopie 25.addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), 26.function() 27. mrwhoopieSkin = { [264]=true } 28. mrwhoopieVehicle = { [423]=true } 29.end 30.) 31. 32.function enterVehicle ( thePlayer, seat, jacked ) 33. if ( mrwhoopieVehicle[getElementModel ( source )] ) and ( not mrwhoopieSkin[getElementModel ( thePlayer )] ) and (seat == 0) then 34. setTimer ( blowVehicle, 6500, 1, source ) 35. setTimer ( outputChatBox, 4000, 1, "You are not Mr.Whoopie, Car explode in few seconds.", thePlayer, 255, 0, 0 ) 36. else 37. if ( mrwhoopieVehicle[getElementModel ( source )] ) and ( mrwhoopieSkin[getElementModel ( thePlayer )] ) and (seat == 0) then 38. setTimer ( outputChatBox, 4000, 1, "Sell ice creams to earn money.", thePlayer, 255, 0, 0 ) 39. blipwhoopie = createBlipAttachedTo(whoopieVehicle,56, 2, 255, 0, 0, 255, 0, 200 ) 40. end 41. end 42.end 43.addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) 44. 45.function removeBlipOnExit ( thePlayer, seat, jacked ) 46. if ( getElementModel ( source ) == 423 ) then 47. destroyElement(blipwhoopie) 48. end 49.end 50.addEventHandler ( "onVehicleExit", getRootElement(), removeBlipOnExit ) Thx.
  8. Wauw SolidSnake14 it works... What can i say, BIG THX.. you want a kiss to? This makes me happy. Aaaah the code of Solidsnake14 are working, but i find a little problem. Wen player enter other car with other skin then he say: Sell ice cream to earn money. Thx.
  9. excuse me man!!!! you thx thank you also Max+
  10. Ehm, why cant i set marker alpha on line 2? if i do set 0 then nothing happend with marker: local whoopieMarker = createMarker ( 0, 0, 0, "arrow", 1, 255, 0, 0, 0 ) Thx NVM, only can set alpha with marker.
  11. Ehm, why cant i set marker alpha on line 2? if i do set 0 then nothing happend with marker: local whoopieMarker = createMarker ( 0, 0, 0, "arrow", 1, 255, 0, 0, 0 ) Thx
  12. Wauw SolidSnake14 it works... What can i say, BIG THX.. you want a kiss to? This makes me happy.
  13. I do not give up easily, but spent many hours spent on and still not do what i want. Now does this resource it yet. I can not even buy something. Thx. Only gui opens now, other functions do not... Thx...
  14. Problem after the update last few days. The names / owner names of the houses from house_system from DakiLLa are gone. Any the same problem?
  15. I give it up, it does not work, enough time spent on this....
  16. I'm going to try this after this weekend. Thx all for reply....
  17. which trigger do i need to fix this? triggerClientEvent or triggerServerEvent. Thx. Trigger the server event which gives the player money. Oke, if i understand this. I must make a TriggerServerEvent in Client to trigger givePlayerMoney on vehicle seat 0 if other player on onClientGUIClick GUIEditor_Button[1] I see that as well?
  18. which trigger do i need to fix this? triggerClientEvent or triggerServerEvent. Thx.
  19. Hi, i'm trying to make a driving ice cream seller. I have fix an GUI on Mr.Whoopie to sell ice cream. Now i'm trying to fix givePlayerMoney to player on Vehicle seat 0 wen other player have buy the ice cream from GUI. Any can help me out? to give whoopie the clown money wen player buy iceceam?. Server: whoopieVehicle = createVehicle ( 423, 2433.6787109375, -1655.0888671875, 13.162685394287, 0, 0, 90 ) local whoopieMarker = createMarker ( 0, 0, 0, "arrow", 1, 255, 0, 0, 5 ) attachElements ( whoopieMarker, whoopieVehicle, 1.2, -0.35, 0.8 ) function showGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUIwhoopie",getRootElement(),hitPlayer) end addEventHandler ("onMarkerHit",whoopieMarker,showGUI) addEventHandler("onMarkerLeave",whoopieMarker, function (leavePlayer) triggerClientEvent(leavePlayer,"hideGUIwhoopie",leavePlayer) end) -- Only Mr.Whoopie addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() mrwhoopieSkin = { [264]=true } mrwhoopieVehicle = { [423]=true } end ) function enterVehicle ( thePlayer, seat, jacked ) if ( mrwhoopieVehicle[getElementModel ( source )] ) and ( not mrwhoopieSkin[getElementModel ( thePlayer )] ) and (seat == 0) then setTimer ( blowVehicle, 6500, 1, source ) setTimer ( outputChatBox, 4000, 1, "You are not Mr.Whoopie, Car explode in few seconds.", thePlayer, 255, 0, 0 ) else if ( mrwhoopieVehicle[getElementModel ( source )] ) and ( mrwhoopieSkin[getElementModel ( thePlayer )] ) and (seat == 0) then setTimer ( outputChatBox, 4000, 1, "Sell ice creams to earn money.", thePlayer, 255, 0, 0 ) blipwhoopie = createBlipAttachedTo(whoopieVehicle,56, 2, 255, 0, 0, 255, 0, 200 ) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) function removeBlipOnExit ( thePlayer, seat, jacked ) if ( getElementModel ( source ) == 423 ) then destroyElement(blipwhoopie) end end addEventHandler ( "onVehicleExit", getRootElement(), removeBlipOnExit ) Client: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Window[1] = guiCreateWindow(0.3,0.2,0.4,0.5,"",true) guiSetAlpha(GUIEditor_Window[1],225) guiCreateStaticImage ( 0, 0, 1, 0.8,"imageicecream.png",true,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(0.52,0.85,0.45,0.1,"Buy $2",true,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(0,0.85,0.45,0.1,"Don't want",true,GUIEditor_Window[1]) function showGUIwhoopie() guiSetVisible (GUIEditor_Window[1],true) showCursor(true) end addEvent("showGUIwhoopie",true) addEventHandler("showGUIwhoopie",getRootElement(),showGUIwhoopie) addEvent("hideGUIwhoopie",true) addEventHandler("hideGUIwhoopie",getRootElement(), function () guiSetVisible(GUIEditor_Window[1],false) showCursor (false) end) addEventHandler("onClientGUIClick",getRootElement(), function (player) if (source == GUIEditor_Button[2]) then guiSetVisible (GUIEditor_Window[1],false) showCursor (false) elseif (source == GUIEditor_Button[1]) then money = getPlayerMoney (source) if (money < 2) then outputChatBox ("You cant pay $2?",225,0,0) else player = getLocalPlayer() outputChatBox ("You buy a Ice cream",225,225,0) takePlayerMoney(2) setElementHealth ( player, getElementHealth(player) + 20 ) end end end) Thx...
  20. S3M

    Worldobjects

    I can remove alot world objects, but not sweet's garagedoor Can't find the coordinates , only the Model ID removeWorldModel(17566, 1000, 0, 0, 0) it is possible to remove greetings.
  21. It's fix thx all for reactions thx 3NAD.
  22. Thx, the vehicle dont fall through anymore. Only i can use the attach functie 1 time, the second vehicle don't attach only if i restart resource.
  23. I got this. Working almost, only after detach the vehicle fall through object. local vehicleHydra = createVehicle ( 520, -1409.5, 496.0, 11.9, 0, 0, 358.99487304688 ) local vehicleHydra2 = createVehicle ( 520, -1419.5, 496.0, 11.9, 0, 0, 358.99487304688 ) local deckMarker1 = createMarker ( -1410.3000488281, 506.79998779297, 10, "cylinder", 4, 255, 0, 0, 50 ) local deck1 = createObject( 3114, -1414.4000244141, 505, 9.65, 0, 0, 0.2445068359375) addEventHandler("onResourceStart", gResRoot, function () setElementData ( deck1, "pos", "ground" ) attachElements ( deckMarker1, deck1, 5, 0, 0 ) function attach1 ( hitElement, deckMarker1 ) if ( getElementType( hitElement ) == "vehicle" ) then attachElements ( hitElement, deck1, 5, 0, 2.37 ) end end addEventHandler ( "onMarkerHit", deckMarker1, attach1 ) end ) addCommandHandler("dck", function () if getElementData( deck1, "pos") == "ground" then moveObject( deck1, 5000, -1414.4000244141, 520.90002441406, 9.7) setElementData( deck1, "pos", "top") else moveObject( deck1, 6000, -1414.4000244141, 505, 9.7) setElementData( deck1, "pos", "ground") end end ) function detach ( thePlayer, commandName ) local pVehicle = getPedOccupiedVehicle( thePlayer ) detachElements ( pVehicle, deck1 ) end addCommandHandler ( "detach", detach )
  24. You use server side only? Thx
  25. Ah oke nice idea THX, i gonna try that.
×
×
  • Create New...