Jump to content

bosslorenz

Members
  • Posts

    200
  • Joined

  • Last visited

Everything posted by bosslorenz

  1. local theVehicle = {} function vehicle1() local playerTeam = getPlayerTeam ( source ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if ( teamName == "LV MAFIA" ) then local x,y,z = getElementPosition(source) if (getElementType(hitElement) == "player") and not isPedInVehicle(hitElement) then if isElement( theVehicle[hitElement] ) then destroyElement( theVehicle[hitElement] ) end theVehicle[hitElement] = createVehicle( 580, 1927.5999755859, 1309.8000488281, 9.3999996185303, 0, 0, 270 ) else outputChatBox ("You cant spawn vehicle here, you`re not LV MAFIA player",player,200, 0, 100) end end end addEvent("spawn1", true) addEventHandler("spawn1",root,vehicle1) addEventHandler("onPlayerWasted",root,function() if isElement( theVehicle[source]) then destroyElement(theVehicle[source]) theVehicle[source] = nil end end ) addEventHandler("onPlayerQuit",root,function() if isElement( theVehicle[source]) then destroyElement(theVehicle[source]) theVehicle[source] = nil end end ) function vehicle2() local playerTeam = getPlayerTeam ( source ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if ( teamName == "LV MAFIA" ) then local x,y,z = getElementPosition(source) if (getElementType(hitElement) == "player") and not isPedInVehicle(hitElement) then if isElement( theVehicle[hitElement] ) then destroyElement( theVehicle[hitElement] ) end theVehicle[hitElement] = createVehicle( 463, 1928.0999755859, 1313.0999755859, 8.8999996185303, 0, 0, 270 ) else outputChatBox ("You cant spawn vehicle here, you`re not LV MAFIA player",player,200, 0, 100) end end end addEvent("spawn2", true) addEventHandler("spawn2",root,vehicle2) addEventHandler("onPlayerWasted",root,function() if isElement( theVehicle[source]) then destroyElement(theVehicle[source]) theVehicle[source] = nil end end ) addEventHandler("onPlayerQuit",root,function() if isElement( theVehicle[source]) then destroyElement(theVehicle[source]) theVehicle[source] = nil end end ) @IIYAMA , still wont work #HAVING PROBLEM WITH THIS DESTROY SPAWN VEHICLE WHEN SPAWNING ANOTHER ONE, and also "onPlayerQuit" and "onPlayerWasted" #AND ALSO WONT SPAWN VEHICLE SAYS YOU ARE NOT IN TEAM LV. Even tho Im on TEAM LV
  2. local theVehicle = {} function vehicle1() local playerTeam = getPlayerTeam ( source ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if ( teamName == "LV MAFIA" ) then local x,y,z = getElementPosition(source) if (getElementType(hitElement) == "player") and not isPedInVehicle(hitElement) then if isElement( theVehicle[hitElement] ) then destroyElement( theVehicle[hitElement] ) end theVehicle[hitElement] = createVehicle( 580, 1927.5999755859, 1309.8000488281, 9.3999996185303, 0, 0, 270 ) else outputChatBox ("You cant spawn vehicle here, you`re not LV MAFIA player",player,200, 0, 100) end end end addEvent("spawn1", true) addEventHandler("spawn1",root,vehicle1) addEventHandler("onPlayerWasted",root,function() if isElement( theVehicle[source]) then destroyElement(theVehicle[source]) theVehicle[source] = nil end end ) addEventHandler("onPlayerQuit",root,function() if isElement( theVehicle[source]) then destroyElement(theVehicle[source]) theVehicle[source] = nil end end ) function vehicle2() local playerTeam = getPlayerTeam ( source ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if ( teamName == "LV MAFIA" ) then local x,y,z = getElementPosition(source) if (getElementType(hitElement) == "player") and not isPedInVehicle(hitElement) then if isElement( theVehicle[hitElement] ) then destroyElement( theVehicle[hitElement] ) end theVehicle[hitElement] = createVehicle( 463, 1928.0999755859, 1313.0999755859, 8.8999996185303, 0, 0, 270 ) else outputChatBox ("You cant spawn vehicle here, you`re not LV MAFIA player",player,200, 0, 100) end end end addEvent("spawn2", true) addEventHandler("spawn2",root,vehicle2) addEventHandler("onPlayerWasted",root,function() if isElement( theVehicle[source]) then destroyElement(theVehicle[source]) theVehicle[source] = nil end end ) addEventHandler("onPlayerQuit",root,function() if isElement( theVehicle[source]) then destroyElement(theVehicle[source]) theVehicle[source] = nil end end ) I added the destroyElement from my script to GUI script with spawn vehicle. And now, it doesnt spawn anymore vehicles...
  3. SERVER SIDE function vehicle1() local playerTeam = getPlayerTeam ( source ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if ( teamName == "LV MAFIA" ) then local x,y,z = getElementPosition(source) createVehicle( 580, 1927.5999755859, 1309.8000488281, 9.3999996185303, 0, 0, 270 ) else outputChatBox ("You cant spawn vehicle here, you`re not LV MAFIA player",player,200, 0, 100) end end addEvent("spawn1", true) addEventHandler("spawn1",root,vehicle1) function vehicle2() local playerTeam = getPlayerTeam ( source ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if ( teamName == "LV MAFIA" ) then local x,y,z = getElementPosition(source) createVehicle( 463, 1928.0999755859, 1313.0999755859, 8.8999996185303, 0, 0, 270 ) else outputChatBox ("You cant spawn vehicle here, you`re not LV MAFIA player",player,200, 0, 100) end end addEvent("spawn2", true) addEventHandler("spawn2",root,vehicle2) CLIENT SIDE local marker1 = createMarker( 1920.599609375, 1310.099609375, 8, "cylinder", 2, 0 ,0, 255, 155 ) GUIEditor = { button = {}, window = {}, memo = {} } function showGUI() GUIEditor.window[1] = guiCreateWindow(275, 76, 219, 461, "LV MAFIA VEHICLE SPAWNER", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF41FF00") GUIEditor.button[1] = guiCreateButton(9, 27, 200, 79, "STAFFORD", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") GUIEditor.button[2] = guiCreateButton(9, 114, 200, 76, "FREEWAY", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF0000") GUIEditor.button[3] = guiCreateButton(131, 415, 78, 36, "CLOSE", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 216, 200, 169, "This is only available to team LV MAFIA. That means, only players who are in team LV MAFIA can spawn vehicles in this marker.\n\nWARNING : Spawning another vehicle will destroy the existing vehicle you spawned earlier.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) showCursor(true) end addEventHandler("onClientMarkerHit",marker1,showGUI) function spawn1() if ( source == GUIEditor.button[1] ) then triggerServerEvent("spawn1",localPlayer) guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end addEventHandler ("onClientGUIClick", root, spawn1) function spawn2() if ( source == GUIEditor.button[2] ) then triggerServerEvent("spawn2",localPlayer) guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end addEventHandler ("onClientGUIClick", root, spawn2) function closeGUI() if ( source == GUIEditor.button[3] ) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end addEventHandler ("onClientGUIClick", root, closeGUI) Ive dont spawner now, but I want to destroy players vehicle if spawning another one and "onPlayerWasted", "onPlayerQuit"
  4. SERVER SIDE function vehicle1() local playerTeam = getPlayerTeam ( source ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if ( teamName == "LV MAFIA" ) then local x,y,z = getElementPosition(source) createVehicle( 580, 1927.5999755859, 1309.8000488281, 9.3999996185303, 0, 0, 270 ) else outputChatBox ("You cant spawn vehicle here, you`re not LV MAFIA player",player,200, 0, 100) end end addEvent("spawn1", true) addEventHandler("spawn1",root,vehicle1) function vehicle2() local playerTeam = getPlayerTeam ( source ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if ( teamName == "LV MAFIA" ) then local x,y,z = getElementPosition(source) createVehicle( 463, 1928.0999755859, 1313.0999755859, 8.8999996185303, 0, 0, 270 ) else outputChatBox ("You cant spawn vehicle here, you`re not LV MAFIA player",player,200, 0, 100) end end addEvent("spawn2", true) addEventHandler("spawn2",root,vehicle2) CLIENT SIDE local marker1 = createMarker( 1920.599609375, 1310.099609375, 8, "cylinder", 2, 0 ,0, 255, 155 ) GUIEditor = { button = {}, window = {}, memo = {} } function showGUI() GUIEditor.window[1] = guiCreateWindow(275, 76, 219, 461, "LV MAFIA VEHICLE SPAWNER", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF41FF00") GUIEditor.button[1] = guiCreateButton(9, 27, 200, 79, "STAFFORD", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") GUIEditor.button[2] = guiCreateButton(9, 114, 200, 76, "FREEWAY", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF0000") GUIEditor.button[3] = guiCreateButton(131, 415, 78, 36, "CLOSE", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 216, 200, 169, "This is only available to team LV MAFIA. That means, only players who are in team LV MAFIA can spawn vehicles in this marker.\n\nWARNING : Spawning another vehicle will destroy the existing vehicle you spawned earlier.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) showCursor(true) end addEventHandler("onClientMarkerHit",marker1,showGUI) function spawn1() if ( source == GUIEditor.button[1] ) then triggerServerEvent("spawn1",localPlayer) guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end addEventHandler ("onClientGUIClick", root, spawn1) function spawn2() if ( source == GUIEditor.button[2] ) then triggerServerEvent("spawn2",localPlayer) guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end addEventHandler ("onClientGUIClick", root, spawn2) function closeGUI() if ( source == GUIEditor.button[3] ) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end addEventHandler ("onClientGUIClick", root, closeGUI) Ive dont spawner now, but I want to destroy players vehicle if spawning another one and "onPlayerWasted", "onPlayerQuit"
  5. SERVER SIDE function vehicle1() local playerTeam = getPlayerTeam ( source ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if ( teamName == "LV MAFIA" ) then local x,y,z = getElementPosition(source) createVehicle( 580, 1927.5999755859, 1309.8000488281, 9.3999996185303, 0, 0, 270 ) else outputChatBox ("You cant spawn vehicle here, you`re not LV MAFIA player",player,200, 0, 100) end end addEvent("spawn1", true) addEventHandler("spawn1",root,vehicle1) function vehicle2() local playerTeam = getPlayerTeam ( source ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if ( teamName == "LV MAFIA" ) then local x,y,z = getElementPosition(source) createVehicle( 463, 1928.0999755859, 1313.0999755859, 8.8999996185303, 0, 0, 270 ) else outputChatBox ("You cant spawn vehicle here, you`re not LV MAFIA player",player,200, 0, 100) end end addEvent("spawn2", true) addEventHandler("spawn2",root,vehicle2) CLIENT SIDE local marker1 = createMarker( 1920.599609375, 1310.099609375, 8, "cylinder", 2, 0 ,0, 255, 155 ) GUIEditor = { button = {}, window = {}, memo = {} } function showGUI() GUIEditor.window[1] = guiCreateWindow(275, 76, 219, 461, "LV MAFIA VEHICLE SPAWNER", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF41FF00") GUIEditor.button[1] = guiCreateButton(9, 27, 200, 79, "STAFFORD", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") GUIEditor.button[2] = guiCreateButton(9, 114, 200, 76, "FREEWAY", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF0000") GUIEditor.button[3] = guiCreateButton(131, 415, 78, 36, "CLOSE", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 216, 200, 169, "This is only available to team LV MAFIA. That means, only players who are in team LV MAFIA can spawn vehicles in this marker.\n\nWARNING : Spawning another vehicle will destroy the existing vehicle you spawned earlier.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) showCursor(true) end addEventHandler("onClientMarkerHit",marker1,showGUI) function spawn1() if ( source == GUIEditor.button[1] ) then triggerServerEvent("spawn1",localPlayer) guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end addEventHandler ("onClientGUIClick", root, spawn1) function spawn2() if ( source == GUIEditor.button[2] ) then triggerServerEvent("spawn2",localPlayer) guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end addEventHandler ("onClientGUIClick", root, spawn2) function closeGUI() if ( source == GUIEditor.button[3] ) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end addEventHandler ("onClientGUIClick", root, closeGUI) Ive dont spawner now, but I want to destroy players vehicle if spawning another one and "onPlayerWasted", "onPlayerQuit"
  6. local marker1 = createMarker( 1920.599609375, 1310.099609375, 8, "cylinder", 2, 0 ,0, 255, 155 ) GUIEditor = { button = {}, window = {}, memo = {} } function showGUI() GUIEditor.window[1] = guiCreateWindow(275, 76, 219, 461, "LV MAFIA VEHICLE SPAWNER", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF41FF00") GUIEditor.button[1] = guiCreateButton(9, 27, 200, 79, "STAFFORD", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") GUIEditor.button[2] = guiCreateButton(9, 114, 200, 76, "FREEWAY", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF0000") GUIEditor.button[3] = guiCreateButton(131, 415, 78, 36, "CLOSE", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 216, 200, 169, "This is only available to team LV MAFIA. That means, only players who are in team LV MAFIA can spawn vehicles in this marker.\n\nWARNING : Spawning another vehicle will destroy the existing vehicle you spawned earlier.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) showCursor(true) end addEventHandler("onClientMarkerHit",marker1,showGUI) function spawn1() if (source== GUIEditor.button[1]) then veh = createVehicle(580, 1927.5999755859, 1309.8000488281, 9.3999996185303, 0, 0, 270) guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end addEventHandler("onClientGUIClick", root , spawn1) Its working now, it spawns car but player cant enter the vehicle.
  7. "play" type="map" version="1.0.0"> "TESTING.map" dimension="0"> "#maxplayers" value="[ 128 ]"> "#useLODs" value="[ false ]"> "#gamespeed" value="[ 1 ]"> "#minplayers" value="[ 0 ]"> "#gravity" value="[ 0.0080000003799796104 ]"> "#waveheight" value="[ 0 ]"> "#locked_time" value="[ true ]"> "#weather" value="[ 0 ]"> "#time" value="5:0">
  8. local marker1 = createMarker( 1920.599609375, 1310.099609375, 8, "cylinder", 2, 0 ,0, 255, 155 ) GUIEditor = { button = {}, window = {}, memo = {} } function showGUI() GUIEditor.window[1] = guiCreateWindow(275, 76, 219, 461, "LV MAFIA VEHICLE SPAWNER", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF41FF00") GUIEditor.button[1] = guiCreateButton(9, 27, 200, 79, "STAFFORD", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") GUIEditor.button[2] = guiCreateButton(9, 114, 200, 76, "FREEWAY", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF0000") GUIEditor.button[3] = guiCreateButton(131, 415, 78, 36, "CLOSE", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 216, 200, 169, "This is only available to team LV MAFIA. That means, only players who are in team LV MAFIA can spawn vehicles in this marker.\n\nWARNING : Spawning another vehicle will destroy the existing vehicle you spawned earlier.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) end addEventHandler("onMarkerHit",marker1,showGUI) LVspawner.lua:10: attempt to call global 'guiCreateWindow' (a nil value)
  9. local marker1 = createMarker( 1920.599609375, 1310.099609375, 8, "cylinder", 2, 0 ,0, 255, 155 ) GUIEditor = { button = {}, window = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(275, 76, 219, 461, "LV MAFIA VEHICLE SPAWNER", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF41FF00") GUIEditor.button[1] = guiCreateButton(9, 27, 200, 79, "STAFFORD", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") GUIEditor.button[2] = guiCreateButton(9, 114, 200, 76, "FREEWAY", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF0000") GUIEditor.button[3] = guiCreateButton(131, 415, 78, 36, "CLOSE", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 216, 200, 169, "This is only available to team LV MAFIA. That means, only players who are in team LV MAFIA can spawn vehicles in this marker.\n\nWARNING : Spawning another vehicle will destroy the existing vehicle you spawned earlier.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) end ) addEventHandler("onMarkerHit",marker1,showGUI) Why GUI is not showing up when I step on marker
  10. Also tested this : Sends to all players in server. Just want to be send to someone who pick F2.
  11. Also here, Bad argument @ .setTeamFriendlyFire. [Expected team at argument 1, got string .MILITARY.] Also here, Bad argument @ .setTeamFriendlyFire. [Expected team at argument 1, got string .LV MAFIA.]
  12. bosslorenz

    SAFEZONE

    WARNING : Duplicate script file in resource 'editor_test' : 'safe1.lua' Cant solve this problem. Can anyone help me?
  13. bindKey doesnt seem working and ammo given to player is infinite.
  14. Can you help me guys, How can I make a bindkey "F1" for func (teamChoose) and after F1, the cameraMatrix fades. And another problem is my giveWeapon seems to give infinite ammo on player but on script, its only 200 ammo.
  15. Very very helpful, now I got no bad argument anymore THANKS :0
  16. Its working now, but not destroyed after OnPlayerQuit,OnPlayerWasted and OnPlayerLogout
  17. I dont know where to put bindkey F1 for team1 and how to remove setCameraMatrix when players has chose team.
  18. How to update zombiekills in scoreboard every 5 secs like that.
  19. Im not asking for the script lol. the one i said was just reply
  20. Its like press F1 to choose Team1,Spawnpoint1,Guns1 and press F2 to choose Team2,spawnpoint2,Guns2
  21. Is it possible without a GUI created ?
  22. Its working fine but it just not update . It only updates when reconnecting. I want to make it update every 10 secs.
  23. Still wont work, once I step into the marker, other players car vanishes
  24. I have script spawn vehicle but it only spawns 1 vehicle for all players. What I want is to spawn vehicle for every ACCOUNT and GUEST
×
×
  • Create New...