Jump to content

Et-win

Members
  • Posts

    1,390
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Et-win

  1. First usage = not removing, because it was never set before. Useless to remove it then. It's about the second time and up, just like I said:
  2. +1 But don't give up the hope
  3. No offence, but there goes another change of learning how to do it by yourself.
  4. function functionname() --Blablabla test function. end function testje() if (cAdd ~= nil) then cRemove = removeCommandHandler("test1", functionname) end cAdd = addCommandHandler("test1", functionname) outputChatBox(tostring(cRemove)) outputChatBox(tostring(cAdd)) end testje() addCommandHandler("testen", testje) function functionname() --Blablabla test function. end function testje() if (cAdd ~= nil) then cRemove = removeCommandHandler("test1", functionname) end setTimer(function() cAdd = addCommandHandler("test1", functionname) end, 50, 1) outputChatBox(tostring(cRemove)) outputChatBox(tostring(cAdd)) end testje() addCommandHandler("testen", testje) By using the command: First time using it: it gets not removed but it gets added. Just like how it's supposed to work. Using it the second time: It gets removed and it gets NOT added. Third time: It gets not removed, but it gets added. Fourth time: It gets removed, but NOT added. Fifth: etc. I bet someone knows why the first explanation doesn't work, but the second does. Bug, or...? Point of this script: By startup setting the command. As soon as you go to the 'Settings Panel' you can set your own commands. As soon as you click 'Save', this function gets started. It gets the old commands which are saved in variables (Not shown in this function). It removes the addCommandHandler with this variable and then sets the new one. The problem is: It will remove the old ones, but not add the new ones. This only works with the timer!
  5. Go in-game, then press 't' and typ: /debugscript 3 You need to be logged in and you need to be Admin. You also can press 'F8' and typ: debugscript 3 Same with Admin. Then, start/restart your resource. All error's that appear there, post them here. (For quick-copy, press 'F8' and typ them there. If you are done, then copy and paste them here)
  6. guiCreateCheckBox Click on it. See 6th argument.
  7. The only thing I can think of to do this, is using the database. You can also save every name in a XML file.
  8. And also don't forget to look what 'onPlayerWasted' returns through the function. (Parameters)
  9. Eh, what? If this is a download, upload it to the community.
  10. Et-win

    Job....

    Lol, I don't care about the posts, but about people who ask us to constantly fix stuff while they don't want to learn.
  11. Et-win

    Job....

    Also a person who just takes scripts and throw them onto this forum, asking why they aren't working or asking us to edit it to his wish. I was just thinking that because he hasn't been online since Jun. 30 and you joined on Jun. 29. Also he doesn't want to learn to script, just like you.
  12. Et-win

    vehicles table

    I see here that the table gets saved on the account data. As soon as someone logs in, receive that data so it's usable again. ('onPlayerLogin', not 'onPlayerJoin' since then she/he isn't logged it.)
  13. Et-win

    vehicles table

    You have to add such an event like onPlayerJoin And call the vehicles
  14. Et-win

    Job....

    I was just thinking, are you Hectorman?
  15. Probably the problem was only that the 'onClientRender' was not working how he wished. Ow and btw @Saml1er: That doesn't work, right? I mean. The files are server-sided, and you are now trying to load them client-sided? If so you will have to trigger from client to server, get the files and then trigger them back to client.
  16. Found your problem: It just worked? Lol. And +1 @Saml1er
  17. Just scripted this for you (Tested and works): *Cut * Will test yours in a minute. Just scripted this to get to know how everything works. (I also was bored )
  18. function showZone(tPlayer) local x, y, z = getElementPosition(tPlayer) local gZone = getZoneName(x, y, z, true) --'true' = for city's only. outputChatBox(gZone, tPlayer) end addCommandHandler("zone", showZone) In-game, typ: /zone This output's the city where you are currently. You can use this for your script, which is easier than a ColShape. (If you want whole LV to be no wanted level in.)
  19. Here is your problem: for _, downFile in pairs(downloadFiles) do outputChatBox(tostring(downFile)) lol = downloadFile(downFile) outputChatBox(tostring(lol)) end 'downFile' is a table. Which means, you have to fill this in by 'downloadFile': downloadFile(downFile[1]) EDIT: Damn xXMADEXx, you are earlier than me.
  20. Mmm, I will test it this morning for you, since no one knows it lol.
  21. If it doesn't work by then, change function name because you have it the same a variable. (Not totally sure or that matters)
  22. function addCmd () outputChatBox ("Place bets") addCommandHandler ("bet", bet) end addEventHandler ("onGamemodeMapStart", getRootElement(), addCmd) You forgot 'addEvent'.
×
×
  • Create New...