Jump to content

KidMoppuc

Members
  • Posts

    16
  • Joined

  • Last visited

Everything posted by KidMoppuc

  1. Ahh, it works! Thank you! Why didn't it work without that?
  2. Okay, I've changed it up again! But nothing happens at all now... function JoinHandler (player) if player then if isElement(player) then spawnPlayer(player, x, y, z) setCameraTarget(player, player) fadeCamera(player, true) outputChatBox("Welcome to our newest server, unfortunately, it is still under development. Please visit later.", player) return end end end function settheTimer() setTimer ( JoinHandler, 1000, 1 ) end addEventHandler("onPlayerJoin", root, settheTimer)
  3. That 'source' is nil. However it works without the timer??
  4. Why do I get this error - when it should be returning a number? setPlayerMoney(source, (getPlayerMoney(source) - 100)) Thanks
  5. Something like this; function revivePlayer() setTimer( function() spawnPlayer(source, x, y, z) setCameraTarget(source, source) fadeCamera(source, true) outputChatBox("You have been killed, a fee of $100 has been deducted from your account.", source) setPlayerMoney(source, (getPlayerMoney(source) - 100)) end, 3000, 1) end addEventHandler("onPlayerWasted", root, revivePlayer)
  6. What would be the easiest way to set a time for this function? (Also, if you spot any errors feel free to point them out!) This script works, however when I add a timer, it gives me errors that it couldn't find the 'source' element. Whereas it works without the timer! function revivePlayer() local money = getPlayerMoney(source) spawnPlayer(source, x, y, z) setCameraTarget(source, source) fadeCamera(source, true) outputChatBox("You have been killed, a fee of $100 has been deducted from your account.", source) setPlayerMoney(source, (tostring(money) - 100)) end addEventHandler("onPlayerWasted", root, revivePlayer) Thanks
  7. What would be the best way to get the cursors position?
  8. Perfect, thank you!
  9. Hi, I created this so that when you type /show, the Image is show. So how can I make it that when I click on the dxDrawImage it disappears? Thanks
  10. I'm using the default "play" gamemode, so isn't player already spawned? Or am I getting confused here?
  11. Okay, so setElementHealth(getLocalPlayer(), 100) Did not work. The player is already spawned and playable! Any suggestions?
  12. I tried that; function revivePlayer() if button == "left" then guiSetVisible(GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] )) setElementHealth(localPlayer, 100) showCursor(false) end end Still nothing!
  13. When that event is triggered, the GUI disappears and the Cursor no longer shows (as it was supposed to), however, the players health does not change to 100?
  14. Hi, I am new to scripting, but why wont the setElementHealth work? Both the hiding cursor and hiding GUI work. (Client) function revivePlayer(button) if button == "left" then guiSetVisible(GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] )) setElementHealth(player, 100) showCursor(false) end end Thanks!
×
×
  • Create New...