Jump to content

FSXTim

Members
  • Posts

    220
  • Joined

  • Last visited

Everything posted by FSXTim

  1. Yea, thanks for your answer! But I have to tell you this is wrong, because what is, when the player buys 2 Repair items? Then the script set it alsways to '1', but the player bought 2 items, you know? Greets
  2. No Error now, thanks! But still having a problem: I bought a 'Repair' but there is still '0' in the database @ 'Repair'! Does anybody has an idea? Greets
  3. Error(Line7): Attempt to perform arithmetic on a boolean value function repair1_Button (state) local lp = getLocalPlayer() if state == "left" then if source == GUIEditor_Button[1] then if getElementData ( lp, "Money" ) >= 50 then takePlayerMoney ( 50 ) setElementData ( lp, "Repair", getElementData ( lp, "Repair" ) + 1 ) outputChatBox ("Du hast Dir ein Auto Repair gekauft!", 0, 255, 0 ) else outputChatBox ( "Du hast nicht genug Geld - Ein Auto Repair kostet 50$", 255, 0, 0 ) end end end end addEventHandler("onClientGUIClick", getRootElement(), repair1_Button) Can anybody help me, please? Greets
  4. Error: Server triggered clientside event 'playTheSound1', but event is not added clientside
  5. When one of for RadioButtons get selected, and a player press the 'Start Party' button, music has to start, but it doesn't. serverside: function Music1 ( ) local name = getPlayerName ( source ) outputChatBox ( name.." hat den Party-Knopf gedrückt!", getRootElement(), 0, 255, 255 ) triggerClientEvent ( "playTheSound1", root ) end addEvent ( "Music1", true ) addEventHandler ( "Music1", getRootElement(), Music1 ) function Music2 ( ) local name = getPlayerName ( source ) outputChatBox ( name.." hat den Party-Knopf gedrückt!", getRootElement(), 0, 255, 255 ) triggerClientEvent ( "playTheSound2", root ) end addEvent ( "Music2", true ) addEventHandler ( "Music2", getRootElement(), Music2 ) function Music3 ( ) local name = getPlayerName ( source ) outputChatBox ( name.." hat den Party-Knopf gedrückt!", getRootElement(), 0, 255, 255 ) triggerClientEvent ( "playTheSound3", root ) end addEvent ( "Music3", true ) addEventHandler ( "Music3", getRootElement(), Music3 ) function Music4 ( ) local name = getPlayerName ( source ) outputChatBox ( name.." hat den Party-Knopf gedrückt!", getRootElement(), 0, 255, 255 ) triggerClientEvent ( "playTheSound4", root ) end addEvent ( "Music4", true ) addEventHandler ( "Music4", getRootElement(), Music4 ) clientside: function startMusic ( state ) if ( state == "left" ) then if guiRadioButtonGetSelected( GUIEditor_Radio[10] ) then if ( source == GUIEditor_Button[13] ) then triggerServerEvent ( "Music1", localPlayer ) addEvent ( "playTheSound1", true ) end elseif guiRadioButtonGetSelected( GUIEditor_Radio[11] ) then if ( source == GUIEditor_Button[13] ) then triggerServerEvent ( "Music1", localPlayer ) addEvent ( "playTheSound2", true ) end elseif guiRadioButtonGetSelected( GUIEditor_Radio[12] ) then if ( source == GUIEditor_Button[13] ) then triggerServerEvent ( "Music1", localPlayer ) addEvent ( "playTheSound3", true ) end elseif guiRadioButtonGetSelected( GUIEditor_Radio[13] ) then if ( source == GUIEditor_Button[13] ) then triggerServerEvent ( "Music1", localPlayer ) addEvent ( "playTheSound4", true ) end end end end addEventHandler ( "onClientGUIClick", getRootElement(), startMusic ) addEventHandler ( "playTheSound1", root, function () song1 = playSound ( "music/everything.mp3", false ) setSoundVolume ( song1, 1 ) end ) addEventHandler ( "playTheSound2", root, function () song2 = playSound ( "music/party.mp3", false ) setSoundVolume ( song2, 1 ) end ) addEventHandler ( "playTheSound3", root, function () song3 = playSound ( "music/ibiza.mp3", false ) setSoundVolume ( song3, 1 ) end ) addEventHandler ( "playTheSound4", root, function () song4 = playSound ( "music/writing.mp3", false ) setSoundVolume ( song4, 1 ) end ) Can anybody help me? Greets
  6. Ok, that's working, but can you please help me with teamviewer? Please, I need your help, there is still one problem. Greets
  7. Now I did it like this: Default screen output type: [X] Relative [ ] Absolute Default child output type: [X] Relative [ ] Absolute Correct? And by the way, thanks for your help, sir!
  8. I'm using the guieditor. But when I mark relativ, it won't relative the texts, buttons and edits, will it? (Only the window, eh?) Greets
  9. function() local sWidth, sHeight = guiGetScreenSize() local px = sWidth/1920 local py = sHeight/1080 Still having the same problem as before. Need help, please! Greets
  10. Thanks for your answer, sir! How can I make it working for everybody?
  11. Thanks, it's working now, but still having one problem. I created a GUI and I can see it perfectly, as you can see here: http://s14.directupload.net/file/d/2891 ... 4_png.htm# But my friend can't see the complete GUI, please have a look: http://s14.directupload.net/file/d/2893 ... kv_png.htm Can anybody test it on my server, if he has the same problem as my friend or can anybody tell me the reason for this problem?
  12. Okay, I see! Thanks for everything, I will tell you, if it is working or not! Greets
  13. Thanks for your help, sir! I did it like this: client: function startMusic1 (state) local player = getLocalPlayer() if state == "left" then if source == GUIEditor_Button[13] then triggerServerEvent("Music1", getLocalPlayer(), player) end end end addEventHandler("onClientGUIClick", getRootElement(), startMusic1) server: function Music1 (player) local name = getPlayerName(player) song = playSound("music/everything.mp3", false) setSoundVolume(song, 1) outputChatBox(name.." hat den Party-Knopf gedrückt!", getRootElement(), 0, 255, 255) end addEvent("Music1", true) addEventHandler("Music1", getRootElement(), Music1) Still not working. Same error: server_shop.lua:3: attempt to call global 'playSound' (a nil value) Greets
  14. Thanks for your answer. meta.xml "music\everything.mp3" /> directory: gamemode/shop_client gamemode/shop_server gamemode/music/everything gamemode/meta.xml I will try it like this: 1.playSound("music/everything.mp3", false) Greets
  15. Nobody can help me?
  16. Hello, I have a problem with my script. When a player press the button XY, a song has to start, but it doesn't. /debugscript 3 error: ... attempt to call global 'playSound' (a nil value) client: function startMusic1 (state) local player = getLocalPlayer() if state == "left" then if source == GUIEditor_Button[13] then triggerServerEvent("Music1", getLocalPlayer(), player) end end end addEventHandler("onClientGUIClick", getRootElement(), startMusic1) server: function Music1 (player) local name = getPlayerName(player) song = playSound("everything.mp3", false) setSoundVolume(song, 1) outputChatBox(name.." hat den Party-Knopf gedrückt!", getRootElement(), 0, 255, 255) end addEvent("Music1", true) addEventHandler("Music1", getRootElement(), Music1) Can anybody help me, please? Greets
  17. @jeremaniak You got a PM about my skype name!
  18. How would the function look like to start the script race (resourse race) for a client? Can anybody helf me?
  19. I want to take the standard race recourse. What do I have to modify?
  20. I downloaded all off them. Everytime errors ...
  21. Yes, somebody told me about that, but I want to do that on ONE server. Is there a way to it?
  22. Hello, I have a Reallife server and some players want to race and the others want to play reallife. I can type /start race and /start rallife, I know that, but then everybody have to play the same gamemode. I want that every player can choose the gamemode for himself with the command /race and /reallife. How can I do that? Please help me!
×
×
  • Create New...