Jump to content

Bonsai

Members
  • Posts

    1,031
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Bonsai

  1. Bonsai

    Dead Peds

    Alright, It turned out that function doesn't have any positive effect. I'll try to just loop through all Peds and destroy them when they are dead. Dirty solution but this should work.
  2. If that timer triggers that function every 1 minute, you could just add 1 minute, or 60000 ms to playtime instead of calculating anything.
  3. Bonsai

    Dead Peds

    removePedFromVehicle I'll try that, thanks
  4. Bonsai

    Dead Peds

    Peds are created by spawnPlayer, get warped into vehicles, normal race stuff. At some point they either drown, explode or just get killed by killPed. I got a function attached to onPlayerWasted, that does killPed (because its same function for pressing enter) and destroyElement and takes care of the player vehicle. Destroying vehicles works fine this way, but I don't know whats wrong with the peds.
  5. Bonsai

    Dead Peds

    Sometimes they either just lie on the ground dead, or they do this.. dying animation like when you kick someone who is on the ground. Yeah, I'm using destroyElement, but it doesn't work all the time.
  6. Bonsai

    Dead Peds

    Hey Peeps, is there a way to make sure Peds are definitely destroyed? Sometimes they keep doing some dying animation and don't disappear at all. This fucks up my spectator mode for some reason. Bonsai
  7. Yeah, but actually I only play on DDC from time to time
  8. Check the meta.xml of race resource. Its starting some other resources when its started.
  9. Depends, if you were using a different nick maybe, at least I don't remember this one
  10. Ahh, the quitType.. of course. Sorry. Thanks for that. About this destroyElement, I read somewhere that peds are destroyed that way. But sometimes the peds still don't disappear and keep doing some dying animation. Bonsai
  11. now if the vote redo is end with yes the map is restart Even if there was played i want if voteredo end with yes the map restart after he finsh (after all players die) Ah, I see. So basically you want to set nextmap to the currently played map when the voting is successful. The thing you need to edit is not in the part of the code u posted.
  12. You want it to redo AFTER the map is finished and not instantly? Or do u just want to play the same map over and over again?
  13. Hey peeps, I got a little problem with removing vehicles of dead players. It seems to work fine as long as the vehicles did not explode. But if that happened, it will stay until resource is restarted. function enterVehicle(player) playerVehicle[player] = source end addEventHandler("onVehicleEnter", root, enterVehicle) function kill(p) if p then source = p end unbindKey(source, "enter", "down", "suicide") if isPedDead(source) == false then killPed(source) destroyElement(source) end if playerVehicle[source] then setTimer(destroyPlayerVehicle, 5000, 1, playerVehicle[source]) end end addEventHandler("onPlayerQuit", root, kill) addCommandHandler("suicide", kill) addEvent("onRequestKillPlayer", true) addEventHandler("onRequestKillPlayer", root, kill) function destroyPlayerVehicle(vehicle) destroyElement(vehicle) end This is my code and most of the time its working good. But sometimes dead peds don't disappear either. Is it even possible to destroy dead peds by destroyElement? killPed only seems to kill them, but they aren't disappearing after that. Bonsai
  14. Despite the fact that maps with big mp3 files suck, I can't find neither music.mp3 nor music2.mp3 in your script. Just set the volume of that song to zero where you use playSound on the other one.
  15. Bonsai

    Respawn

    Isn't there an respawn setting in race settings? Check admin panel.
  16. You need to get the Position within that function. Else it isn't updating.
  17. Are you talking about this MTA built in login confirm? If so, try -cancelEvent on https://wiki.multitheftauto.com/wiki/OnPlayerLogin and then - https://wiki.multitheftauto.com/wiki/LogIn Never did that, no idea what happens.
  18. Well, people on this board are supposed to provide you guidelines, not making the script for you. You should show us what you got so far, so we can tell you how to continue. It seems like you didn't make anything yet. You need to make a window, two buttons, shown on clientResourceStart. On Button click you simply change the skin and add the clicker to the requested team. As soon as thats done you can think about this balance thing.
  19. https://wiki.multitheftauto.com/wiki/GetCameraRotation https://wiki.multitheftauto.com/wiki/Ge ... ceRotation https://wiki.multitheftauto.com/wiki/FindRotation Thats what you will need.
  20. You create a rectangle, camera targets blip always in middle, other player blips according to distance. If u want the SA map to be shown u have find one and draw image section, or, bit more laggy probably, create a rendertarget for it.
  21. If you use x*0.9 for example, it will always be on the same position on x axis. At least as long as the screen format stays the same. 16:9 will not look like 4:3.
  22. How can such an easy function cause such a long discussion? What is wrong there?
  23. Oh wow, thats one perfect answer I did it a bit different, but its pretty much the same. And so far everything is working good. Sometimes I get errors in debuglog caused by map scripts, but I guess that are general problems in those scripts, not related to the loading progress. At least I didn't find a map yet thats impossible to finish because of missing marker, objects etc. Thanks for your detailed answer.
  24. Afaik this new function and the event will be part of 1.4, so they aren't available yet.
  25. So its just for security purposes but does not affect if its working? Sounds important, but in my opinion maps with compiled scripts shouldn't be uploaded anyway. There are things possible much worse then changing element data or triggering events and it doesn't even have to be in acl.
×
×
  • Create New...