Jump to content

Et-win

Members
  • Posts

    1,390
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Et-win

  1. local functionToDo = 1 function theFunction() if (functionToDo == 1) then functionToDo = 2 --Do stuff elseif (functionToDo == 2) then functionToDo = 1 --Do stuff end end bindKey("F6", "down", theFunction) Just use some variables.
  2. Et-win

    Convert number

    Oops, I never remember them (English )
  3. Et-win

    Convert number

    math.floor --Highest math.ceil --Lowest
  4. Et-win

    SOLVED!

    I think that is because of 'setVehicleLocked'. Try this: function onEnter(thePlayer) if (getElementModel(thePlayer) ~= 29) then cancelEvent() outputChatBox("Test1", thePlayer) end end addEventHandler("onVehicleStartEnter", getRootElement(), onEnter)
  5. Et-win

    SOLVED!

    Yup. function cars () c1 = createVehicle ( 602, 2284.399, -1114.599, 37.700, 0, 0, 90 ) end addEventHandler ( "onResourceStart", resourceRoot, cars ) function lock () if getElementModel ( source ) == 29 then setVehicleLocked ( c1, false ) else setVehicleLocked ( c1, true ) removePedFromVehicle ( source ) outputChatBox ("This vehicle is locked on team: Avenged Sevenfold!", source) end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), lock) You had 'thePlayer' here, while it had to be 'source': if getElementModel ( thePlayer ) == 29 then
  6. It's "font.ttf" not "font.tff"
  7. Et-win

    SOLVED!

    Typ in the chatbox in-game: /debugscript 3 Does it output anything? ;P
  8. Et-win

    Question

    function getTable() local theTable = { [1]=getElementData(player, "Bungee"), [2]=getPlayerMoney(player), [3]=getElementDimension(player), -- ... } return theTable end local gTable = getTable() for k=1, #gTable do setAccountData(account, "data."..tostring(k), gTable[k]) end --Or: for tableIndex, tableValue in pairs(getTable()) do setAccountData(account, "data."..tostring(tableIndex), tableValue) end
  9. Why don't you just do: local theCuboid = createColCuboid( fx, fy, fz, 5, 1, 1 ) ?
  10. Et-win

    Question

    "data."..tostring(k) Atleast this Do you mean, as soon as you are going to save it, it has to re-get the element data and then save it?
  11. local theCuboid = createColCuboid( x, y, z, 5, 1, 1 ) Did this not return 'false'?
  12. Don't give the function/table the same name as the table/function. Also, did you trigger the table to client?
  13. Et-win

    MTA 1.4

    I always use debugscript 3, there were no bugs, nor my script was wrong. And if you say it was, what will explain it worked after only adding 'outputChatBox' and also 3 others confirmed this in the start of the topic?
  14. Et-win

    MTA 1.4

    I was either changing or adding stuff to my Clan War System. (Just changing the current script, not adding or removing, just editing.) 'outputChatBox' has indeed nothing to do with this, but I restarted my script 2 times when it didn't do it's job because I was sure it should work. Then I added 'outputChatBox' to see where it stopped working, and suddently it did work after the restart. Everything before the little change did work, but my changed thing didn't, only after what I just said. This is why I think that it doesn't always refresh the script when restarting it. I'm using my local server and never had problems with this before. About /refreshall: It takes too long to constantly do this when you are just adding like 1~5 lines and have to test or it works. Currently using what Bonsai says: /stop and /start (On a bind, just like /restart). I will move on to and try /refreshall if I don't had any problems tomorrow.
  15. Et-win

    MTA 1.4

    I can't specific tell you when it happens. It happens randomly. It can't be my script(s), because like I said in my first post, I only added 'outputChatBox' to the script, restarted it again and suddently it worked. I never had this though on earlier versions.
  16. Et-win

    MTA 1.4

    In MTA 1.0.5 and up until MTA 1.4, /restart did restart + refresh the resource. And also now it does, but very sometimes, it doesn't. I'm talking about a resource where I'm currently scripting in, not adding a new resource.
  17. Et-win

    MTA 1.4

    Using those two commands on binds now atm, didn't see anything yet but it only happens rarely. Still, I reported this because it's not very normal.
  18. local peds = getElementHealth (ped1)
  19. Et-win

    MTA 1.4

    Happened server-side to me. And if you mean Streaming memory: is min.
  20. Add the resource to the Admin group, or only give it 'addAccount' rights. (function.addAccount)
  21. Change event 'onMarkerHit' to 'onPlayerMarkerHit'. Then, change all 'thePlayer''s to 'source'.
  22. Et-win

    MTA 1.4

    Hello people, I just have a question. Do you guys have the same problem as me, that if you are scripting and your script just is correct, but it doesn't work and after changing 1 thing in the script (e.g: Putting outputChatBox in the script to check where the script stops) and that it suddently works after that, while you didn't change anything? (And yes, I did refresh and restart the script(s)) I had this several times, but I don't know or it's MTA 1.4 or just my laptop (Since I had more problems with it, lol.)?
  23. In Notepad++ the numbers are blue, which I already thought it was strange. Maybe it's reserved for XML, but I'm totally not sure.
×
×
  • Create New...