Jump to content

GerardWay

Members
  • Posts

    284
  • Joined

  • Last visited

Everything posted by GerardWay

  1. Fixed it guys, thanks anyway, I had missed out a bit of TAPL's code, my bad
  2. Now the panel doesn't show at all
  3. GerardWay

    VIP System

    Whenever I start this resource, the panel appears immediately. It also shows to every player. I want the Panel to show and hide with the key F6, and I want it to only show to those who are in the 'VIP' table. Any help please? client.lua GUIEditor = { button = {}, window = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(126, 0, 1115, 307, "Backup Server V.I.P System", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(25, 40, 293, 109, "Spawn Seasparrow", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(410, 40, 293, 109, "Spawn Patriot", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(25, 40, 293, 109, "Give Rockets", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(25, 185, 293, 109, "Use V.I.P Skin", false, GUIEditor.window[1]) GUIEditor.button[5] = guiCreateButton(410, 185, 293, 109, "Teleport to Luxury Area", false, GUIEditor.window[1]) GUIEditor.button[7] = guiCreateButton(796, 40, 293, 109, "Fill Health", false, GUIEditor.window[1]) GUIEditor.button[8] = guiCreateButton(796, 185, 293, 109, "Fill Armour", false, GUIEditor.window[1]) showCursor (true) end ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor.button[1] ) then triggerServerEvent("Seasparrow",getLocalPlayer()) elseif ( source == GUIEditor.button[2] ) then triggerServerEvent("Patriot",getLocalPlayer()) elseif ( source == GUIEditor.button[3] ) then triggerServerEvent("Rockets",getLocalPlayer()) elseif ( source == GUIEditor.button[4] ) then triggerServerEvent("Skin", getLocalPlayer()) elseif ( source == GUIEditor.button[5] ) then triggerServerEvent("Teleport",getLocalPlayer()) elseif ( source == GUIEditor.button[7] ) then triggerServerEvent("Health",getLocalPlayer()) elseif ( source == GUIEditor.button[8] ) then triggerServerEvent("Armor",getLocalPlayer()) end end ) function show() if (getElementData(source, "VIP") == true) then if guiGetVisible(GUIEditor.window[1]) == true then guiSetVisible(GUIEditor.window[1], false) showCursor(false) guiSetInputEnabled(false) else guiSetVisible(GUIEditor.window[1], true) showCursor(true) guiSetInputEnabled(true) end end end addCommandHandler("vipGUI", show) bindKey("F7", "down", show) server.lua local VIP = {} local VIPmembers = { {"Anon"}, } function addVIPs() for i, plr in pairs(getElementsByType("player")) do for index, VIP in pairs(VIPmembers) do local accountname = getAccountName(getPlayerAccount(plr)) if (accountname == VIP[1]) then setElementData(plr, "VIP", true) VIP[plr] = true end end end end addEventHandler("onResourceStart", resourceRoot, addVIPs) function onloginAddVIP() for i, VIP in pairs(VIPmembers) do local accountname = getAccountName(getPlayerAccount(source)) if (accountname == VIP[1]) then VIP[source] = true outputChatBox("You have logged in as a VIP", source, 0, 255, 0) setElementData(source, "VIP", true) end end end addEventHandler("onPlayerLogin", root, onloginAddVIP) function spawnSparrow() if ( not isPedInVehicle ( source ) ) then local x, y, z = getElementPosition ( source ) veh = createVehicle ( 447, x + 3, y, z ) warpPedIntoVehicle (source, veh) end end addEvent("Seasparrow",true) addEventHandler("Seasparrow",getRootElement(),spawnSparrow) function spawnPatriot() if ( not isPedInVehicle ( source ) ) then local x, y, z = getElementPosition ( source ) veh = createVehicle ( 470, x + 3, y, z ) warpPedIntoVehicle (source, veh) end end addEvent("Patriot",true) addEventHandler("Patriot",getRootElement(),spawnPatriot) function giveRocket() giveWeapon (source, 35, 5) end addEvent ("Rockets",true) addEventHandler ("Rockets",getRootElement(),giveRocket) function setVIPSkin() setElementModel ( source, "50" ) end addEvent("Skin",true) addEventHandler("Skin",getRootElement(),setVIPSkin) function teleportPlayer() setElementPosition (source, 0, 0, 5) end addEvent("Teleport",true) addEventHandler("Teleport",getRootElement(),teleportPlayer) function playerHealth() setElementHealth (source, 200) end addEvent("Health",true) addEventHandler ("Health", getRootElement(), playerHealth) function playerArmor() setPedArmor (source, 100) end addEvent("Armor",true) addEventHandler("Armor", getRootElement(), playerArmor)
  4. resisteam = createTeam ("Resistance / Criminals", 255, 0, 0) marker1 = createMarker (1015.5999755859, 2141.3000488281, 9.8000001907349, "cylinder", 1, 255, 0, 0, 200) function spawn(hitElement) setPlayerTeam (source, resisteam) spawnPlayer (source, 1091.63159, 2111.34351, 15.35040, 7, 0, 0) outputChatBox ( "You have spawned as a 'Resistance Member'!", source, 255, 0, 0, true ) setElementModel (source, 7) setPlayerNametagColor (source, 255, 0, 0) fadeCamera (source, true) setCameraTarget (source, source) giveWeapon (source, 28, 2000) giveWeapon (source, 23, 2000) end addEventHandler ("onMarkerHit", marker1, spawn) The marker appears, but nothing happens when I enter it, any help please?
  5. ERROR: Client (Booker) triggered serverside event Military, but event is not added serverside
  6. Oh, thanks, also Here's the meta:
  7. Hey, could anyone help with this? The GUI Shows, but the cursor does not. And when I click one of the buttons, nothing happens and in /debugscript 3 it says that it isnt added Serverside, yet it clearly is. Any help please? Client.lua GUIEditor = { button = {}, window = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(0, -4, 1366, 768, "", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) Military = guiCreateButton(47, 130, 1278, 201, "Military", false, GUIEditor.window[1]) guiSetFont(Military, "sa-gothic") guiSetProperty(Military, "NormalTextColour", "FF3BFF00") Resistance = guiCreateButton(47, 472, 1278, 201, "Resistance", false, GUIEditor.window[1]) guiSetFont(Resistance, "sa-gothic") guiSetProperty(Resistance, "NormalTextColour", "FFFF0000") GUIEditor.label[1] = guiCreateLabel(133, 370, 1298, 68, "The Backup Server - Spawning System", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-gothic") showCursor (true) end ) showCursor (false) addEventHandler("onClientGUIClick", root, function() if source == Military then triggerServerEvent("Military", localPlayer) elseif source == Resistance then triggerServerEvent ("Military", localPlayer) destroyElement(GUIEditor_window[1]) showCursor (false) end end ) addEvent("setSpawnVisible",true) addEventHandler("setSpawnVisible",root, function () guiSetVisible( GUIEditor_window[1], true ) setTimer( function () showCursor( true ) end, 1000,1) end ) Server.lua addEvent( "Military", true) addEventHandler( "Military", root, function() team1 = createTeam ("Military Forces", 0, 255, 0) setPlayerTeam (source, team1) spawnPlayer (source, 207.90919, 1865.12842, 13.14063, 287, 0, 0) setElementModel (source, 287) fadeCamera (source, true) setCameraTarget (source, source) giveWeapon (source, 28, 2000) giveWeapon (source, 23, 2000) end ) addEvent( "Resistance", true) addEventHandler( "Resistance", root, function() team2 = createTeam ("Resistance", 255, 0, 0) setPlayerTeam (source, team2) spawnPlayer (source, 1090.90808, 2115.29443, 15.35040, 7, 0, 0) setElementModel (source, 7) fadeCamera (source, true) setCameraTarget (source, source) giveWeapon (source, 28, 2000) giveWeapon (source, 23, 2000) end ) addEventHandler ( "onPlayerLogin", root, addEventHandler ("onPlayerWasted", root, function ( ) triggerClientEvent ( source, "setSpawnVisible", source, true ) end ) Any help is appreciated as always, Thank You!
  8. omg, now I feel dumb, thanks man
  9. Hey guys, the problem here is that the gate appears, but does not move when I enter the marker. Any help please? function gateCreate() gate1 = createObject (980, 135.19921875, 1943.19921875, 21.39999961853, 0, 0, 0) end addEventHandler ("onResourceStart", resourceRoot, gateCreate) function markerCreate() marker1 = createMarker (136, 1943.2998046875, 17.799999237061, 'Cylinder', 25, 0, 0, 0, 0) end addEventHandler ("onResourceStart", resourceRoot, markerCreate) function gateMove(thePlayer, hitElement) if source == marker1 then moveObject (gate1, 135.19999694824, 1943.1999511719, 27.200000762939) end end addEventHandler ("onMarkerHit", getRootElement(), gateMove) function gateBack(thePlayer, hitElement) if source == marker1 then moveObject (gate1, 135.19921875, 1943.19921875, 21.39999961853) end end addEventHandler ("onMarkerLeave", getRootElement(), gateBack)
  10. Hey guys, I made a YouTube Video on how to get $10Million/hour on GTA Online, using an unpatched glitch. I'm just posting this as it seems like something a lot of you would be interested in, have fun! Also, if you guys could go ahead and do me one favor, could you please Subscribe to the channel and check out our other current videos please, Infect will become a small YouTube Group soon as more people are joining us, but we also need a growing ViewCount and amount of Subscribers, Thank You!
  11. Title says it all. GUI = { window = {}, label = {}, memo = {} } window = guiCreateWindow(74, 0, 1024, 703, "Zombie Outbreak Reloaded - Official Gangs/Squads", false) guiWindowSetSizable(window, false) GUI.label[1] = guiCreateLabel(126, 32, 806, 96, "Search And Rescue - Level 5", false, window) guiSetFont(GUI.label[1], "sa-gothic") guiLabelSetColor(GUI.label[1], 0, 5, 255) GUI.label[2] = guiCreateLabel(99, 128, 852, 63, "Outlaws Of Mayhem - Level 5", false, window) guiSetFont(GUI.label[2], "sa-gothic") guiLabelSetColor(GUI.label[2], 235, 0, 0) GUI.label[3] = guiCreateLabel(162, 230, 848, 66, "The Phantom Aces - Level 4", false, window) guiSetFont(GUI.label[3], "sa-gothic") GUI.label[4] = guiCreateLabel(135, 350, 860, 112, "Special Military Unit - Level 2", false, window) guiSetFont(GUI.label[4], "sa-gothic") guiLabelSetColor(GUI.label[4], 19, 24, 255) GUI.label[5] = guiCreateLabel(243, 462, 859, 92, "Alpha Team - Level 1", false, window) guiSetFont(GUI.label[5], "sa-gothic") guiLabelSetColor(GUI.label[5], 19, 255, 46) GUI.label[6] = guiCreateLabel(437, 103, 417, 25, "Leader: Devildog", false, window) guiSetFont(GUI.label[6], "default-bold-small") GUI.label[7] = guiCreateLabel(407, 306, 231, 15, "Leaders: Atlas, Cyanide, Mayuri", false, window) guiSetFont(GUI.label[7], "default-bold-small") GUI.label[8] = guiCreateLabel(440, 197, 98, 15, "Leader: Michaell", false, window) guiSetFont(GUI.label[8], "default-bold-small") GUI.label[9] = guiCreateLabel(438, 416, 225, 15, "Leader: Chilenoazul", false, window) guiSetFont(GUI.label[9], "default-bold-small") GUI.label[10] = guiCreateLabel(442, 527, 221, 17, "Leader: Shaman", false, window) guiSetFont(GUI.label[10], "default-bold-small") GUI.label[11] = guiCreateLabel(186, 572, 777, 91, "Secret Service - No Level", false, window) guiSetFont(GUI.label[11], "sa-gothic") guiLabelSetColor(GUI.label[11], 0, 206, 231) GUI.label[12] = guiCreateLabel(442, 631, 220, 15, "Leader: Haze", false, window) guiSetFont(GUI.label[12], "default-bold-small") button = guiCreateButton(302, 695, 540, 95, "Close", false, window) guiSetFont(button[1], "sa-gothic") addEventHandler("onClientGUIClick",button,CloseGui) end ) function CloseGui () guiSetVisible(window, false) showCursor(false) end addCommandHandler("groupinfo", function visible() guiSetVisible(window, true) setTimer ( showCursor,1000,1,true ) end ) can you guys help with this please? Appreciated.
  12. Thank you Vortex Servers! I now have a free 3 Month Server set up in NY, all done within a few minutes! I appreciate it
  13. I've forgotten my account details, but would I be able to just set up a new account and organise this through Skype by any chance? Anything done is appreciated.
  14. Alright, so lets get this straight. I bought a server from LatencyHost over a month ago. 30 Slots. After 2 days, it stops working. It never came back on after that. I had a really bad support experience too, it sucked. But then I get told that Vortex Servers took over LatencyHost. I continue to have absolutely no hosting, even though I paid for it, and the second month's payment is taken out of my bank account. Still no hosting. I try www.latencyhost.com/members, and what do i get? A shutdown website. So I payed $6.00 in total for a server that didn't even work. Now the question is, will I be receiving a refund? Or at least Hosting equal to the amount that I paid for the server that didn't work? Because now this is starting to annoy me. $6.00 might not be much, but that isn't the point. You're wasting my money. And I want something to replace it. Yours Sincerely - Kieren Davison
  15. GerardWay

    Spawn GUI

    Hey, I'm trying to create a GridList Spawn Menu, and I designed one using GUIEditor. Could somebody do the other coding for me please? I'm not lazy, I just struggle a lot with Gridlists. GUIEditor = { gridlist = {}, window = {}, button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(86, 57, 1173, 507, "", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.gridlist[1] = guiCreateGridList(9, 20, 1154, 297, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Military Services", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Gangs", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Police Forces", 0.3) guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "Soldier", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "Rebel", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 3, "S.W.A.T Officer", false, false) GUIEditor.button[1] = guiCreateButton(298, 365, 582, 132, "Spawn", false, GUIEditor.window[1]) end ) The whole image didn't show up, so here's the link for the Image - http://i.imgur.com/BDlL5ga.png
  16. Still nothing, but I did /debugscript 3 and this is the output vpanel/s.lua:1: unexpected symbol near '?' vpanel/c.lua:2: } expected (to close '{' at line 1) near '
  17. Now the GUI isn't appearing at all
  18. Could anyone fix this for me please? The GUI works fine, but whenever I click the name of a Vehicle and click 'Select' the panel closes but doesn't spawn that vehicle. Client.lua GUIEditor = { gridlist = {}, window = {}, button = {} } local vehs = {"BMX", "Coach", "Patriot", "QuadBike", "Maverick", "Stuntplane", "Rancher", "Comet", "Barracks"} GUIEditor.window[1] = guiCreateWindow(1135, 180, 231, 588, "", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(17, 19, 204, 390, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Free Vehicles", 0.9) for i, v in ipairs (vehs) do row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText (GUIEditor.gridlist[1], row, 1, tostring(v), false, false) end GUIEditor.button[1] = guiCreateButton(23, 419, 199, 68, "Select", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(25, 491, 197, 68, "Cancel", false, GUIEditor.window[1]) addEventHandler("onClientGUIClick", root, function() if (source == GUIEditor.button[2]) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end ) addEvent("openGUI", true) addEventHandler("openGUI", root, function() guiSetVisible(GUIEditor.window[1], true) showCursor(true) end ) addEventHandler("onClientGUIClick", root, function () if (source == GUIEditor.button[1]) then local vehicleName = guiGridListGetItemText(GUIEditor.gridlist[1], guiGridListGetSelectedItem(GUIEditor.gridlist[1]), 1) local id = getVehicleModelFromName(vehicleName) triggerServerEvent("spawnVehicle", localPlayer, id) guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end ) Server.lua function showPanel(thePlayer) triggerClientEvent(thePlayer, "openGUI", root) end function onResourceStart() for index, players in ipairs(getElementsByType("player")) do bindKey(players, "F4", "down", showPanel) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onResourceStart) function onPlayerJoin() bindKey(source, "F4", "down", showPanel) end addEventHandler("onPlayerLogin", getRootElement(), onPlayerJoin) addEvent("spawnVehicle", true ) addEventHandler("spawnVehicle", root, function ( vehID ) if ( isElement ( vehicles [ source ] ) ) then destroyElement ( vehicles [ source ] ) end vehicles [ source ] = createVehicle ( vehID, getElementPosition ( source ) ) if ( vehicles [ source ] ) then setVehicleColor ( vehicles [ source ], 255, 255, 255 ) end setTimer ( warpPedIntoVehicle, 200, 1, source, vehicles [ source ] ) end ) function destroyVehicle() if ( isElement ( vehicles [ source ] ) ) then destroyElement ( vehicles [ source ] ) end end addEventHandler("onPlayerLogout", root, destroyVehicle) addEventHandler("onPlayerQuit", root, destroyVehicle) addEventHandler("onPlayerWasted", root, destroyVehicle)
  19. Could someone please help me out with this? The peds are showing, but they can be killed. function peds() ped1 = createPed (285, 201.2998, 1922.59961, 17.6, 0, 0, 180.005) ped2 = createPed (280, 209.7, 1922.69995, 17.6, 0, 0, 180) ped3 = createPed (282, 218.7, 1922.90002, 17.6, 0, 0, 176) ped4 = createPed (15, 190.10000610352, 1922.8000488281, 17.60000038147, 0, 0, 180.005493) end addEventHandler ("onResourceStart", resourceRoot, peds) function pedDamage() cancelEvent() end addEventHandler ( "onClientPedDamage", ped1, pedDamage ) addEventHandler ( "onClientPedDamage", ped2, pedDamage ) addEventHandler ( "onClientPedDamage", ped3, pedDamage ) addEventHandler ( "onClientPedDamage", ped4, pedDamage )
  20. I'll get right on it guys, please be patient.
  21. Hello MTA:SA Community. I happen to be friends with the Actors of 'Lamar' and 'Trevor' from GTA V. I decided that instead of letting this connection go to waste, I was going to give you guys an opportunity to ask any questions you may have! However, I have one rule. Please keep the questions clean. No racism or offensive comments please! Any offensive or racist questions will not be used. As soon as I get enough questions, I'll ask the questions and post the answers on this forum. So get asking!
  22. I bought a host from these guys a week ago. The server has been down for exactly 6 and a half days now, and on the one day that it was online, it lagged like hell for every single player ingame. The download was slow, the support team are idiots and don't reply if they even come close to coming to the point where they need to hand out a refund. They just ignore you. Worst company i've ever recieved hosting from. Rating - 0 out of 10
  23. function vehCreate() veh1 = createVehicle (447, -1420.7259521484, 501.92907714844, 17.640787124634) setVehicleDamageProof (veh1, true) end addEventHandler ("onResourceStart", getRootElement(), vehCreate) function vehCreate2() veh2 = createVehicle (447, -1407.1575927734, 502.88314819336, 18.18126, 18.376713624268) setVehicleDamageProof (veh2, true) end addEventHandler ("onResourceStart", getRootElement(), vehCreate2)
  24. Whenever I use createVehicle , it totally glitches out. Lets say if I try to get in the created vehicle, another vehicle of the same kind will be inside that created vehicle. Does anybody know how to fix this please?
×
×
  • Create New...