Jump to content

xXMADEXx

Members
  • Posts

    2,718
  • Joined

  • Last visited

Everything posted by xXMADEXx

  1. You make a new server file. 1. He has no single idea about servers 2. He has no single idea about scripting 3. It is not a server file, it's a lua file 1. No need to be mean 2. If you were smart anougf, you would have known i was talking about the type, and not formt.
  2. local hillArea = createColRectangle ( -78.839538574219, 2421.6831054688, 550, 175 ) local hillRadar = createRadarArea ( -78.839538574219, 2421.6831054688, 550, 175, 200, 0, 0, 175 ) -- add hill_Enter as a handler for when a player enters the hill area function hill_Enter ( thePlayer, matchingDimension ) -- announce to everyone that the player entered the hill if (getElementType(thePlayer) == "player") then outputChatBox( getPlayerName(thePlayer) .. ' has entered the Dethmatch Zone!', getRootElement(), 255, 0, 0 ) setRadarAreaFlashing ( hillRadar, false ) end end addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) -- add hill_Enter as a handler for when a player leaves the hill area function hill_Exit ( thePlayer, matchingDimension ) -- check if the player is not dead if (getElementType(thePlayer) == "player") then if isPedDead ( thePlayer ) ~= true then -- if he was alive, announce to everyone that the player has left the hill outputChatBox ( getPlayerName(thePlayer) .. " has left the Dethmatch Zone!", getRootElement(), 255, 0, 0 ) setRadarAreaFlashing ( hillRadar, false ) end end end addEventHandler ( "onColShapeLeave", hillArea, hill_Exit )
  3. Hey guys! ya ya ya, its me again (the noobie ass scripter!) So, i have this turf color thing that i want to say that they have leaved/entered, but i want it to only say it to them, not the whole server. I have tried changing it to a client type, but then it doesnt outputChatBox at all . If you could help the i would be sooooo
  4. Kinda wishing i was a better scripter right now (facepalm)
  5. damn.... Can you add me on skype so you can join my server and help me out? (if you want my skype is topKIDminer)
  6. so, could i just make a script for each spawner?
  7. Can i switch it to "showGUI3"?
  8. You make a new server file.
  9. =========================FREE SPAWNER============================= Server.lua: LSPD = createMarker( 1536.2338867188, -1654.8493652344, 12.5, "cylinder", 2, 0, 100, 255, 200 ) Hosp1 = createMarker( 1183.8322753906, -1313.5714111328, 12.5, "cylinder", 2, 0, 100, 255, 200 ) Spawn = createMarker( 1647.9964599609, -2244.6364746094, 12.5, "cylinder", 2, 0, 100, 255, 200 ) Spawnlot = createMarker( 1536.7595214844, -2235.4956054688, 12.7, "cylinder", 2, 0, 100, 255, 200 ) Grovestreet = createMarker( 2490.3369140625, -1665.6422119141, 12.3, "cylinder", 2, 0, 100, 255, 200 ) nearAP = createMarker(1946.6610107422, -2140.8979492188, 12.7, "cylinder", 2, 0, 100, 255, 200 ) park = createMarker(1647.7314453125, -1134.5999755859, 23, "cylinder", 2, 0, 100, 255, 200 ) hosp = createMarker(2000.9978027344, -1446.0225830078, 12.5, "cylinder", 2, 0, 100, 255, 200 ) hosp3 = createMarker(1602.1302490234, 1838.1687011719, 10, "cylinder", 2, 0, 100, 255, 200 ) SFPD = createMarker(-1568.4545898438, 674.07067871094, 6, "cylinder", 2, 0, 100, 255, 200 ) LVAP = createMarker(1706.4786376953, 1454.9436035156, 10, "cylinder", 2, 0, 100, 255, 200 ) LVPD = createMarker(2282.3659667969, 2426.1804199219, 10, "cylinder", 2, 0, 100, 255, 200 ) local vehicles = {} function spawnFreeVeh(id) local x, y, z = getElementPosition(source) if isElement(vehicles[source]) then destroyElement(vehicles[source]) end vehicles[source] = createVehicle(id, x + 1, y, z) end addEvent("CreVehice",true) addEventHandler("CreVehice", root, spawnFreeVeh) addEventHandler("onPlayerQuit", root, function() if isElement(vehicles[source]) then destroyElement(vehicles[source]) vehicles[source] = nil end end) function freeGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",LSPD,freeGUI) function freeGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",Spawn,freeGUI) function freeGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",Hosp1,freeGUI) function freeGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",Spawnlot,freeGUI) function freeGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",Grovestreet,freeGUI) function freeGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",nearAP,freeGUI) function freeGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",park,freeGUI) function freeGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",hosp,freeGUI) function freeGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",hosp3,freeGUI) function freeGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",SFPD,freeGUI) function freeGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",LVAP,freeGUI) function freeGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",LVPD,freeGUI) Client.lua: Wnd = guiCreateWindow(579,245,482,622,"US-RP Free Vehicle System",false) guiSetAlpha( Wnd, 1 ) guiWindowSetMovable(Wnd,false) guiWindowSetSizable(Wnd,false) button = guiCreateButton(15,566,458,47,"Exit",false,Wnd) label = guiCreateLabel(127,34,328,41,"Double Click The Vehicle You Wish To Take.",false,Wnd) showCursor(false) guiSetVisible( Wnd, false ) vehicles = { {"Faggio", 462}, {"VooDoo", 412}, {"Glendale", 466} } grid = guiCreateGridList(36,78,421,464,false,Wnd) guiGridListAddColumn(grid, "Vehicles", 0.85) for i,veh in ipairs(vehicles) do row = guiGridListAddRow(grid) -- guiGridListSetItemText(grid, row, 1, tostring(veh[1]), false, false) guiGridListSetItemData(grid, row, 1, tostring(veh[2])) end function use() local row, col = guiGridListGetSelectedItem(grid) if (row and col and row ~= -1 and col ~= -1) then local model = tonumber(guiGridListGetItemData(grid, row, 1)) if model ~= "" then triggerServerEvent("CreVehice", localPlayer, model) end end end addEventHandler("onClientDoubleClick", root, use, false) function close() if (source == button) then guiSetVisible(Wnd,false) showCursor(false) end end addEventHandler("onClientGUIClick", button, close) function freeGUI() guiSetVisible(Wnd,true) showCursor(true) end addEvent("freeGUI",true) addEventHandler("freeGUI", getRootElement(), freeGUI) =====================================MILITARY SPAWNER============================== Server.lua: LSPD = createMarker( 749.77618408203, -2177.5676269531, 12.2, "cylinder", 2, 0, 255, 0, 200 ) local vehicles = {} function spawnVeh(id) local x, y, z = getElementPosition(source) if isElement(vehicles[source]) then destroyElement(vehicles[source]) end vehicles[source] = createVehicle(id, x + 1, y, z) end addEvent("CreVehice",true) addEventHandler("CreVehice", root, spawnVeh) addEventHandler("onPlayerQuit", root, function() if isElement(vehicles[source]) then destroyElement(vehicles[source]) vehicles[source] = nil end end) function showGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",LSPD,showGUI) Client.lua: Wnd = guiCreateWindow(579,245,482,622,"US-RP Free Vehicle System",false) guiSetAlpha( Wnd, 1 ) guiWindowSetMovable(Wnd,false) guiWindowSetSizable(Wnd,false) button = guiCreateButton(15,566,458,47,"Exit",false,Wnd) label = guiCreateLabel(127,34,328,41,"Double Click The Vehicle You Wish To Take.",false,Wnd) showCursor(false) guiSetVisible( Wnd, false ) vehicles = { {"Patriot", 470}, {"Barracks", 433}, {"Police LS", 596}, {"Police LV", 598}, {"Police SF", 597}, } grid = guiCreateGridList(36,78,421,464,false,Wnd) guiGridListAddColumn(grid, "Vehicles", 0.85) for i,veh in ipairs(vehicles) do row = guiGridListAddRow(grid) -- guiGridListSetItemText(grid, row, 1, tostring(veh[1]), false, false) guiGridListSetItemData(grid, row, 1, tostring(veh[2])) end function use() local row, col = guiGridListGetSelectedItem(grid) if (row and col and row ~= -1 and col ~= -1) then local model = tonumber(guiGridListGetItemData(grid, row, 1)) if model ~= "" then triggerServerEvent("CreVehice", localPlayer, model) end end end addEventHandler("onClientDoubleClick", root, use, false) function close() if (source == button) then guiSetVisible(Wnd,false) showCursor(false) end end addEventHandler("onClientGUIClick", button, close) function showGUI2() guiSetVisible(Wnd,true) showCursor(true) end addEvent("showGUI2",true) addEventHandler("showGUI2", getRootElement(), showGUI2) (thanks Castillo )
  10. What is that? Do you think you can help me?
  11. Hey guys!! As some of you may know, i am still a noob at scripting. I'm trying to make a system, where teams (such as swat, mili, misc) have there own spawner's. For some reason if you walk into the free vehicle spawner, it will show the military spawner too. Can somone please help?: server.lua: LSPD = createMarker( 749.77618408203, -2177.5676269531, 12.35, "cylinder", 2, 0, 255, 0, 200 ) local vehicles = {} function spawnVeh(id) local x, y, z = getElementPosition(source) if isElement(vehicles[source]) then destroyElement(vehicles[source]) end vehicles[source] = createVehicle(id, x + 1, y, z) end addEvent("CreVehice",true) addEventHandler("CreVehice", root, spawnVeh) addEventHandler("onPlayerQuit", root, function() if isElement(vehicles[source]) then destroyElement(vehicles[source]) vehicles[source] = nil end end) function showGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",LSPD,showGUI) client.lua: Wnd = guiCreateWindow(579,245,482,622,"US-RP Free Vehicle System",false) guiSetAlpha( Wnd, 1 ) guiWindowSetMovable(Wnd,false) guiWindowSetSizable(Wnd,false) button = guiCreateButton(15,566,458,47,"Exit",false,Wnd) label = guiCreateLabel(127,34,328,41,"Double Click The Vehicle You Wish To Take.",false,Wnd) showCursor(false) guiSetVisible( Wnd, false ) vehicles = { {"troll", 462}, {"VooDoo", 412}, {"Glendale", 466} } grid = guiCreateGridList(36,78,421,464,false,Wnd) guiGridListAddColumn(grid, "Vehicles", 0.85) for i,veh in ipairs(vehicles) do row = guiGridListAddRow(grid) -- guiGridListSetItemText(grid, row, 1, tostring(veh[1]), false, false) guiGridListSetItemData(grid, row, 1, tostring(veh[2])) end function use() local row, col = guiGridListGetSelectedItem(grid) if (row and col and row ~= -1 and col ~= -1) then local model = tonumber(guiGridListGetItemData(grid, row, 1)) if model ~= "" then triggerServerEvent("CreVehice", localPlayer, model) end end end addEventHandler("onClientDoubleClick", root, use, false) function close() if (source == button) then guiSetVisible(Wnd,false) showCursor(false) end end addEventHandler("onClientGUIClick", button, close) function showGUI2() guiSetVisible(Wnd,true) showCursor(true) end addEvent("showGUI2",true) addEventHandler("showGUI2", getRootElement(), showGUI2)
  12. This topic is going to get locked you know...
  13. Would it be possible to put a police car light bar on a Washington and make it have the sound also?
  14. xXMADEXx

    [HELP]Spawn

    how can i make a spawn with these cordinates: X = 1682.6009521484 Y = -2248.4873046875 Z = 13.55 And this skin: 78
  15. Hey guys, i tried putting an ACL lock for admins on here, but it made the script not work. Can anyone help me? function CheatMode(commandName,command,turn) local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "lvl 5" ) ) ) then local turned={ ['on']=true, ['off']=false, } if (command) and (turn) then if (command=='air') and (turned[turn]~=nil) then setWorldSpecialPropertyEnabled('aircars',turned[turn]) elseif (command=='water') and (turned[turn]~=nil) then setWorldSpecialPropertyEnabled('hovercars',turned[turn]) elseif (command=='bike') and (turned[turn]~=nil) then setWorldSpecialPropertyEnabled('extrabunny',turned[turn]) elseif (command=='jump') and (turned[turn]~=nil) then setWorldSpecialPropertyEnabled('extrajump',turned[turn]) elseif (command=='help') or (command==nil) then outputChatBox('First available parameter: water, bike, jump, help, air') outputChatBox('Second available parameter: on, off') end else outputChatBox('Not enough parameters') outputChatBox('First available parameter: water, bike, jump, help, air') outputChatBox('Second available parameter: on, off') end end addCommandHandler('cheat', CheatMode,false) Please help me.
  16. Hey guys, i want to make my server online and im sick of using Hamachi. Does anyone know how to crack a rougter password?
  17. Can somone make me a script so that only a certin team can pick up the guns that are made in the script for them? Like so when i make a weapon spawn in the script, i can set a team for them. It would be VERY useful, thanks
  18. Hey if your a free scripter, add me on skype (topKIDminer) so you can help with my friends server.
  19. I am willing to start mapping with you (and maybe my friend) add me on skype (topKIDminer) or PM me.
  20. Hey guys its me (the noob scripter). Anyway, If i make a car in map editor, how do i make it so its locked when it spawns by the server?
  21. What would the EventHandler be so if someone clicks on my ped that a GUI would show?
  22. Thank you castillo, and Renkon. You guys are pro's.
  23. okey, that makes since but it still isnt working. This is the script i have right now (server side): marker = createMarker ( 2513.4299316406,-1671.6391601563,12.6, "cylinder", 1.5, 255, 0, 0, 170 ) function lol ( thePlayer ) givePlayerMoney ( 99999 ) end addEventHandler ( "onMarkerHit", getRootElement(), lol )
×
×
  • Create New...