Jump to content

Et-win

Members
  • Posts

    1,390
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Et-win

  1. local gPlayers = getElementsByType("player") local gRandomPlayer = math.random(1, #gPlayers) local gRandomPlayer = gPlayers[gRandomPlayer]
  2. Et-win

    Bug Problem

    else setPlayerTeam(source,nil) break --Stop the "for" loop end The problem. You are stopping the table by already the FIRST rule of the table if the place has not the tag from the team. local Table = { {"-|SxG|-","-|SxG|- Skilled Xtreme Gamers",255,155,0}, {"|PaS|","|PaS| Pro Adventure Skills",23,56,89}, } function setTeam2(old,new) local teamFound = false for i,v in ipairs(Table) do if new then if string.find(new, v[1]) then --built-in string function if team then setPlayerTeam(source, getTeamFromName(v[2])) teamFound = true break --Stop the "for" loop end end end end if (teamFound == false) then setPlayerTeam(source, nil) end end addEventHandler("onPlayerChangeNick",root,setTeam2)
  3. Et-win

    Bug Problem

    Not sure, but try checking with 'new'?
  4. Read the wiki, the code is even given.
  5. function health1(tPlayer) outputChatBox("test") -- made this to check if the function self was working and it does setElementHealth ( tPlayer, getElementHealth ( tPlayer) + 25 ) end addCommandHandler("healme",health1) There is no source on addCommandHandler.
  6. If you mean cancelEvent, then put it at the first time of your function. PS: It's cancelEvent() and not cancelevent().
  7. How about explaining why it does matter instead of just throwing an argument like this? i never thought it may need that much of thinking to understand it. i actually can't stop laughing after i read Spajk's reply. Ofcourse you will end up on top if you say that small things doesn't matter (sarcasm) A real scripter always try to make his script more perfect, not just say 13 ms doesn't matter.... As long as script works perfectly, in my eyes is nothing wrong.
  8. Put a check in or it returned boolean 'true' first to be sure it has been placed. + Are you sure you have the right skin model?
  9. dxDrawImage I don't know or you can send it to the scoreboard in a way, but I think you have to edit the scoreboard resource for that.
  10. You have to send the source with the timer, because setTimer doesn't have a source. exports.scoreboard:scoreboardAddColumn( "Player Level" ) function dxScore() setTimer(function(tPlayer) local gData = getElementData(tPlayer,"LV") setElementData ( tPlayer, "Player Level", gData ) end,1500,0, source) end addEventHandler("onPlayerLogin",root,dxScore)
  11. Et-win

    Help BindKey

    Any debugscript 3 errors?
  12. How about explaining why it does matter instead of just throwing an argument like this?
  13. Like 13 milliseconds do matter........
  14. Very nice. Only fix that the marker is not going back down, then it's better.
  15. local spawnLocations = { {2171.90625, 1392.59765625, 10.8203125}, {2265.3674316406, 2398.3068847656, 10.8203125}, {2361.689453125, 2070.2077636719, 10.671875} } function spawnThePlayerDirectly() local chosenSpawnLocation = math.random(1,#spawnLocations) spawnPlayer(source,spawnLocations[chosenSpawnLocation][1],spawnLocations[chosenSpawnLocation][2],spawnLocations[chosenSpawnLocation][3]) fadeCamera(source, true) setCameraTarget(source, source) end addEventHandler("onPlayerJoin",root,spawnThePlayerDirectly) local spawnLocations = { {2171.90625, 1392.59765625, 10.8203125}, {2265.3674316406, 2398.3068847656, 10.8203125}, {2361.689453125, 2070.2077636719, 10.671875} } function spawnThePlayer() setTimer(function(tPlayer) local chosenSpawnLocation = math.random(1,#spawnLocations) spawnPlayer(tPlayer,spawnLocations[chosenSpawnLocation][1],spawnLocations[chosenSpawnLocation][2],spawnLocations[chosenSpawnLocation][3]) fadeCamera(tPlayer, true) setCameraTarget(tPlayer, tPlayer) end, 5000, 1, source) end addEventHandler("onPlayerWasted", getRootElement(), spawnThePlayer) Not sure or you can throw a function into a variable.
  16. Weird, because mine is working.
  17. setTimer is a code and you can't use it like that. Also, like I said, send 'source' with the timer. Like this: function spawnThePlayer() setTimer(function(tPlayer) local chosenSpawnLocation = math.random(1,#spawnLocations) spawnPlayer(tPlayer,spawnLocations[chosenSpawnLocation][1],spawnLocations[chosenSpawnLocation][2],spawnLocations[chosenSpawnLocation][3]) fadeCamera(tPlayer, true) setCameraTarget(tPlayer, tPlayer) end, 5000, 1, source) end addEventHandler("onPlayerWasted", getRootElement(), spawnThePlayer) (Tested) EDIT: Forgot to add it, it's working now x3
  18. addEventHandler("onPlayerWasted",root, setTimer(function(tPlayer) local chosenSpawnLocation = math.random(1,#spawnLocations) spawnPlayer(tPlayer,spawnLocations[chosenSpawnLocation][1],spawnLocations[chosenSpawnLocation][2],spawnLocations[chosenSpawnLocation][3]) fadeCamera(tPlayer, true) setCameraTarget(tPlayer, tPlayer) end, 5000, 1, source) end) You forgot to send the 'source' withing the setTimer, because setTimer has no source you have to send it with it.
  19. What Bonsai said: DX gives an alot better quality for drawing pictures. This doesn't matter when you are only drawing 1 color of course.
  20. Also: elseif getElementData(myGate1,"gate.state" == 1) then Change to: elseif getElementData(myGate1,"gate.state") == 1 then
  21. Are you even sure the picture actually gets drawed? Put a outputChatBox in to be sure. If it does, someone else can help you, because I'm not having time to completely think about how to draw it under a player in the 3D world.
  22. Are you in a team and has this team the name "Test"? Otherwise does it output anything in the chatbox?
×
×
  • Create New...