Jump to content

Jaysds1

Members
  • Posts

    4,961
  • Joined

  • Last visited

Everything posted by Jaysds1

  1. Jaysds1

    Problems

    Is it possible that a person could spawn on a random team? Here is my script, server-side: addEvent("Random",true) addEventHandler("Random",getRootElement(), function() if (source) then setPlayerTeam" class="kw6">setPlayerTeam(source, math.random(teamB, teamS)) if (source) and (teamB) then spawnPlayer(source, x, y, z, 0, math.random(0,288),0, 0) fadeCamera(source, true) setCameraTarget(source, source) elseif (source) and (teamS) then spawnPlayer(source, x, y, z, 0, math.random(0,288),0, 0) fadeCamera(source, true) setCameraTarget(source, source) end end end)
  2. What I do is first add the functions then put quotes, to keep it organize, after I just add the EventHandlers for the buttons: function zombie_LG() GUIEditor_Window[1] = guiCreateWindow(219,223,628,358,"K@N Zombies Login GUI",false) -- Labels GUIEditor_Label[1] = guiCreateLabel(18,21,595,31,"The username or password you have entered seems to be incorrect.",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],0,150,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Label[2] = guiCreateLabel(297,65,270,22,"Username:",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,255,0) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(302,105,270,22,"Password:",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],255,0,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Label[4] = guiCreateLabel(15,50,268,237,"Welcome K@N's zombie server, we have many functions which will keep you having fun. We have a goal to reach over 30 players regually, once we upgrade the server.\n \nYou are to follow the following rules.\n1. Do not hack or cheat with any program.\n2. Respect everyone on the server.\n3.Do not attempt to steal any content we have on our server.\n4. Do not give your password out to anyone\n5. Do not ask to be an admin.\n6. Do not ask an admin to set your cash.\n7. Do not abuse any bug found on the server.\n8. Do not deathmatch those who do not deathmatch.",false,GUIEditor_Window[1]) GUIEditor_Label[5] = guiCreateLabel(431,330,179,16,"Edited by [K@N~AS]Chris|GEN",false,GUIEditor_Window[1]) GUIEditor_Label[6] = guiCreateLabel(8,320,307,36,"Our forum can be found at killallnoobs.forumotion.com\nplease post all bug reports there.",false,GUIEditor_Window[1]) GUIEditor_Label[7] = guiCreateLabel(53,331,5,5,"",false,GUIEditor_Window[1]) -- Players Username and Password GUIEditor_Edit[1] = guiCreateEdit(367,57,178,30,"",false,GUIEditor_Window[1]) GUIEditor_Edit[2] = guiCreateEdit(366,98,180,30,"",false,GUIEditor_Window[1]) -- Buttons GUIEditor_Button[1] = guiCreateButton(367,133,80,23,"Login now",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Button[1],"default-bold-small") GUIEditor_Button[2] = guiCreateButton(452,133,90,23,"Register now",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Button[2],"default-bold-small") --Check boxs GUIEditor_Checkbox[1] = guiCreateCheckBox(314,163,180,22,"Don't start the first mission.",false,false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Checkbox[1],"default-bold-small") GUIEditor_Checkbox[2] = guiCreateCheckBox(314,189,223,17,"I want a weapon when I spawn first. (If you ticked the above)",false,false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Checkbox[2],"default-bold-small") GUIEditor_Checkbox[3] = guiCreateCheckBox(315,276,304,19,"I want to spawn first outside of the spawning area.",false,false,GUIEditor_Window[1]) guiCheckBoxSetSelected(GUIEditor_Checkbox[3],true) guiSetFont(GUIEditor_Checkbox[3],"default-bold-small") GUIEditor_Checkbox[4] = guiCreateCheckBox(315,300,273,19,"I want some zombies when first spawning.",false,false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Checkbox[4],"default-bold-small") -- Radio boxs GUIEditor_Radio[1] = guiCreateRadioButton(343,212,199,18,"Colt-45 with 200 ammo",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Radio[1],"default-bold-small") GUIEditor_Radio[2] = guiCreateRadioButton(343,233,198,18,"Uzi with 100 ammo",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Radio[2],"default-bold-small") GUIEditor_Radio[3] = guiCreateRadioButton(344,252,199,18,"M4 with 75 ammo",false,GUIEditor_Window[1]) guiRadioButtonSetSelected(GUIEditor_Radio[3],true) guiSetFont(GUIEditor_Radio[3],"default-bold-small") end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() -- Create the login gui zombie_LG() -- now make sure the window is open if (GUIEditor_Window[1] ~= nil) then guiSetVisible(GUIEditor_Window[1], true) else -- if there is something wrong, output that there is something wrong outputChatBox("The Login GUI Does not work") end -- enable the players cursor (so they can select and click on the components) showCursor(true) -- set the input focus onto the GUI, allowing players (for example) to press 'T' without the chatbox opening guiSetInputEnabled(true) -- now add our onClientGUIClick event to the button we just created addEventHandler("onClientGUIClick", GUIEditor_Button[1], login, false) addEventHandler("onClientGUIClick", GUIEditor_Button[2], rigister, false) end) this only creates the gui
  3. Jaysds1

    Problems

    NO, I just want to know how to do stuff like this, so when I create my new server I don't need help. Do you think I really want to be on here trying to figure out how to create scripts... i just want to learn and don't come back to this forum, thats all.
  4. When your playing mta, do you have anything running (example: Ares, Messenger, etc.)?
  5. I had the same problem but I exit the game.
  6. Jaysds1

    Problems

    what did I had to change? I looked at it.
  7. Jaysds1

    Problems

    it doesn't work
  8. Jaysds1

    Problems

    ooohhhh, ok I'll add it now.
  9. Jaysds1

    Problems

    Server-side local admins = {} for i, v in ipairs(getElementsByType('player')) do --if isPlayerAdmin then check if the player is admin table.insert(admins, v) --end end triggerClientEvent('admins', root, #admins) local mods = {} for i, v in ipairs(getElementsByType('player')) do --if isPlayerAdmin then check if the player is admin table.insert(mods, v) --end end triggerClientEvent('mods', root, #mods) Client-side addEvent("admins",true) addEventHandler("admins", root, function(admins) guiSetText(admins_on, tostring(#admin)) end) addEvent("mods",true) addEventHandler("mods", root, function(mods) guiSetText(mods_on, tostring(#mods)) end)
  10. I have the same problem. I downloaded the program again and It only showed 1 map when I already have 3 maps. me and you need help...
  11. did you try downloading the program again?
  12. Jaysds1

    Problems

    It doesn't show that 1 admin is online.
  13. Jaysds1

    Ban problem

    Are you using the admin panel?
  14. Jaysds1

    Problems

    the debugscript says that the client side: <name> or '...' expected near ' # '. This is my code, Client-side: addEvent("admins",true) addEventHandler("admins", root, function(#admins) guiSetText(admins_on, tostring(#admin)) end) addEvent("mods",true) addEventHandler("mods", root, function(#mods) guiSetText(mods_on, tostring(#mods)) end) I used the code you gave me.
  15. Jaysds1

    Problems

    so this is the same thing as the players online function but just change the server-side function?
  16. Jaysds1

    Problems

    Volk-rus, I we're done with that now. I just need help with showing the amount of admins or moderators on a gui. thank u though
  17. Jaysds1

    Problems

    lol, ok, I'll think first
  18. Jaysds1

    Problems

    In the resource, the Admins online shows the player name, I want mine to show how much admins is online, but thanks anyways.
  19. Jaysds1

    Net disconnects?

    do you have an irc resource?
  20. Jaysds1

    Net disconnects?

    gang system uses the mysql.
  21. when your testing in the map editor it only shows the stuff you added, not the countdown....
  22. Jaysds1

    Net disconnects?

    anti cheat came with the download, so the anti cheat wouldn't be a problem.
  23. Jaysds1

    Net disconnects?

    not on screen images, only if you have a bad/low connection or have mods.
×
×
  • Create New...