Jump to content

Bonsai

Members
  • Posts

    1,031
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Bonsai

  1. Bonsai

    clear debug?

    Omg, didn't know that Thanks
  2. Hey Peeps, whenever I create or open a file, I close it after everything is done by fileClose. But as long as I don't restart/stop the responsible resource, its not possible to delete the file in its folder. local newFile = fileCreate(file.path) fileWrite(newFile, file.data) fileClose(newFile) E.g. something like that. The new created file is still active in some way. Am I doing something wrong? Bonsai
  3. Redirecting to another server is the simplified version. Everything on one server will never be simple.
  4. You gotta create the gamemodes by urself. You can't use existing gamemodes like race for that. They all gotta have a different parent. Players who join a gamemode get childs of it.
  5. I'm not sure, but I think onClientPlayerJoin doesn't show any messages for the player who is joining, because he is still downloading. Try "onClientResourceStart".
  6. That Error message just confirms what you are saying. Clientside scripts aren't loaded. Most likely because they are either not included in meta, because else you would get some "can't find script" message, or you just never actually "start" anywhere in the client scripts. Try to add an outputChatBox on top of one script out of any function and see what happens. Post your meta and a script here. Makes things a lot easier.
  7. return ends the function immediately. Rest of the function isn't taken care of.
  8. You draw a giant picture on top of your normal screen. Thats totally stupid. If you want a clear screen edit your scripts to hide the HUD/nametags, whatever.
  9. thank you man, your really save me from sleepless nights Told you that hours ago. If you would pay more attention to replies you could have saved us from trying to fix a problem that is already fixed.
  10. function getAlivePlayers() local playerTable = {} for i, p in ipairs(getElementsByType("player")) do if getElementData(p, "state") == "alive" then table.insert(playerTable, p) end end return playerTable end
  11. Did you even read what we wrote? if the team is stored in the police variable server side, then the client script doesn't know about the police variable. So you you have to do what Citizen or I told you to.
  12. Write your own getAlivePlayers function, that checks for the "state" data and only includes players that got the state "alive".
  13. You need to use get functions, such as getTeamFromName etc.
  14. If the string is longer than 10 then you just use string.sup, grab the symbols from 1 to 10, insert a \n and append the rest of the string by doing string.sup from 11 to end. You might have to repeat this if the string need more than 2 lines.
  15. Wow, I could also need this. Thanks
  16. Bonsai

    Save timer

    Maybe getTickCount is more suitable here, if its about game time.
  17. Its some special attributes for gui objects. I thought there might be something helpful.
  18. Maybe you find some help here: http://web.archive.org/web/201207060814 ... ml#Editbox https://wiki.multitheftauto.com/wiki/GuiSetProperty
  19. Bonsai

    Dead Peds

    This is so annoying. It's not working, camera follows to any position. If only the race resource wasn't so fucked up so you could check things there..
  20. Bonsai

    Dead Peds

    Hmm, the camera keeps focusing the player...
  21. Bonsai

    Dead Peds

    Yeah, I've seen that before, but when you join a server without any gamemode running, do you have a Ped somewhere? Which position is unreachable?
  22. setWorldSoundEnabled(17, 10, false) That [index = 10] is just for explanation in wiki.
  23. Ah, I see, but why do you use -1?
  24. Bonsai

    Dead Peds

    Maybe there was a misunderstanding here. The peds I want to destroy were controlled by players before. I tried creating some random peds and kill/destroy them, it worked fine. But player peds just don't disappear. And 5 seconds after they died this "death floating camera" starts, even if I setCameraMatrix to somewhere else.
  25. Where is fixSpeed called? I suggest you using getElementSpeed and setElementSpeed, thats easier too handle. https://wiki.multitheftauto.com/wiki/Useful_Functions
×
×
  • Create New...