Jump to content

megaman54

Members
  • Posts

    245
  • Joined

  • Last visited

Everything posted by megaman54

  1. Thanks to you both, and to JR10, i already tried using strings but then it wont spawn at all.
  2. Question 1: This isn't scripting-related but its small so i dint want to create a topic for it. Here goes: how do i make a IP range-ban in admin panel? Question 2: I'm making a new gamemode but the spawn selection is not working very well. When i select my spawn, like "downtown" it doesnt spawn to where it should spawn. It spawns me to grove, wich is one of the selectable spawns. No matter what spawn i select, it always goes to grove. Here is my code: Client-side: function TriggerTheSpawn ( ) if currentSpawn == 0 then spawn = "grove" unbindKey("lshift", "down", TriggerTheSpawn) unbindKey("d", "down", browseSpawns) unbindKey("a", "down", browseSpawns) unbindKey("arrow_r", "down", browseSpawns) unbindKey("arrow_l", "down", browseSpawns) removeEventHandler("onClientRender", root, renderGui) removeEventHandler("onClientRender", root, grove) triggerServerEvent ( "spawnTrigger", getLocalPlayer(), spawn ) bindKey("f2", "down", StartCSpawnMenu) showPlayerHudComponent ( "radar", true ) elseif currentSpawn == 1 then spawn = "downtown" unbindKey("lshift", "down", TriggerTheSpawn) unbindKey("d", "down", browseSpawns) unbindKey("a", "down", browseSpawns) unbindKey("arrow_r", "down", browseSpawns) unbindKey("arrow_l", "down", browseSpawns) removeEventHandler("onClientRender", root, renderGui) removeEventHandler("onClientRender", root, grove) triggerServerEvent ( "spawnTrigger", getLocalPlayer(), spawn ) bindKey("f2", "down", StartCSpawnMenu) showPlayerHudComponent ( "radar", true ) elseif currentSpawn == 2 then spawn = "beach" unbindKey("lshift", "down", TriggerTheSpawn) unbindKey("d", "down", browseSpawns) unbindKey("a", "down", browseSpawns) unbindKey("arrow_r", "down", browseSpawns) unbindKey("arrow_l", "down", browseSpawns) removeEventHandler("onClientRender", root, renderGUi) removeEventHandler("onClientRender", root, downtown) triggerServerEvent ( "spawnTrigger", getLocalPlayer(), spawn ) bindKey("f2", "down", StartCSpawnMenu) showPlayerHudComponent ( "radar", true ) elseif currentSpawn == 3 then spawn = "airport" unbindKey("lshift", "down", TriggerTheSpawn) unbindKey("d", "down", browseSpawns) unbindKey("a", "down", browseSpawns) unbindKey("arrow_r", "down", browseSpawns) unbindKey("arrow_l", "down", browseSpawns) removeEventHandler("onClientRender", root, renderGUi) removeEventHandler("onClientRender", root, airport) triggerServerEvent ( "spawnTrigger", getLocalPlayer(), spawn ) bindKey("f2", "down", StartCSpawnMenu) showPlayerHudComponent ( "radar", true ) end end Server-side: function spawnHandler() if(spawn == grove)then spawnPlayer(source, 2497.2021, -1666.7891, 13.3850) fadeCamera(source, true) setCameraTarget(source, source) elseif(spawn == downtown)then spawnPlayer(source, 1671.63562, -1325.01025, 17.42757) fadeCamera(source, true) setCameraTarget(source, source) elseif(spawn == beach)then spawnPlayer(source, 322.89639, -1774.56567, 4.85479) fadeCamera(source, true) setCameraTarget(source, source) elseif(spawn == airport)then spawnPlayer(source, 1959.23608, -2272.61108, 13.54688) fadeCamera(source, true) setCameraTarget(source, source) end end addEvent("spawnTrigger", true) addEventHandler("spawnTrigger", getRootElement(), spawnHandler)
  3. So, will this work: i save script as ANSI file and then compile it and then open in notepad and save as UTF-8 file?
  4. Is there a new compiler for UTF-8 formatted files? I'm getting errors with the current ones.
  5. Is it possible to copy maps from other servers with some kind of a program? Some guy said that he has a program like this but i'm not so sure if this is possible. I think it is possible somehow but i dont know how.. hmm i dont know how to explain this any better So i'm asking how to do this or is it even possible?
  6. Thanks to you all! I thnik i'm gonna figure this out more quickly with your help thanks.
  7. Yes! Thanks. But the probelm is, how i could check if the name is in the table?
  8. Ehm... I clearly stated that i want to do it without setPlayerMuted function.
  9. I'm making a mute script wich is different than the default one. It should work like this: i type /smute and it mutes that player without using the setPlayerMuted function. I want to make it like that no-one can see when someone gets muted and when the muted player tries to speak, he wont get the "you are muted" message. So, here is my problem: i must store the muted player names in a table, but i dont know how to check if the name is in the table. Here is what i have done so far: muted = {} function silentMute() I know it isnt much but thats all i can do by myself. I'm a very noob with tables... I hope someone can help me with this.
  10. Thanks for everyone (especially to JR10) fore being helpful. Thanks!
  11. Ahh.. I dint notice it was already like that . Thanks. But now i have other question: after the blip is destroyed, how i get it back? Because the blip is created by freeroam resource so i could have to recall the creation function. But there is some other code that must be executed only when a player joins.
  12. Thanks but i only want to do it to specific players. Like in the example i gave in the first post.
  13. I want to make a exported function to the freeroam resource. Like exports.freeroam:hideBlip(getPlayerFromName("Megaman54"), true) So i could hide blips with command or something. How can this be done?
  14. How did you got the video in hd, I was trying to start the MTA 1.1 with my fraps and it keeps shutting down. Well, I rendered them with Sony Vegas Pro 9 and selected the HD 1060 60i or something. They wre really big like 65GB each so i had to make them smaller but still keep the HD. My MTA 1.1 Did not shutdown with fraps on, and i had a 50FPS limit on fraps.
  15. My little videos: Part 1: Part 2:
  16. Thanks man! It was easier than i thought
  17. Hello! I need to unbind every key from the client. I found this table at wiki keyTable = { "mouse1", "mouse2", "mouse3", "mouse4", "mouse5", "mouse_wheel_up", "mouse_wheel_down", "arrow_l", "arrow_u", "arrow_r", "arrow_d", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "num_0", "num_1", "num_2", "num_3", "num_4", "num_5", "num_6", "num_7", "num_8", "num_9", "num_mul", "num_add", "num_sep", "num_sub", "num_div", "num_dec", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "backspace", "tab", "lalt", "ralt", "enter", "space", "pgup", "pgdn", "end", "home", "insert", "delete", "lshift", "rshift", "lctrl", "rctrl", "[", "]", "pause", "capslock", "scroll", ";", ",", "-", ".", "/", "#", "\\", "=" } but i dont know how to use tables at all.
  18. megaman54

    Ban problem

    My friend is banned in my server without being in ban list so I can't unban him. I tried to remove the ban list (the xml file) but it dint help.
  19. Ehm... How i can use that thing?
  20. Is it possible to run the server as a background process or something? I mean that it could go away from my task-bar but will remain in the taskmanager.
  21. Oh! Thanks and i'm not so good with this "if" stuff yet...
  22. Hello! I made a script where you can remove a vehicle with silenced pistol but the on/off toggle is not working very well. Here is the problem: when i start the script, it says in debugscript 3 that "WARNING: loading script failed: vehicleremover\server.lua:6 '=' expected near '==' " and here is the code wich causes the error: function toggleRemover() if(removerEnabled == false)then removerEnabled == true else removerEnabled == false end end addCommandHandler("vremover", toggleRemover) in this case its line 3.
  23. But in the /help thing it says that the /load command is for loading mods.
×
×
  • Create New...