AlexWo

Members
  • Content Count

    67
  • Joined

  • Last visited

Community Reputation

0 Neutral

About AlexWo

  • Rank
    Snitch
  • Birthday 03/12/1996

Details

  • Location
    Germany
  1. Hello I have a problem in my script... I have 2 Markers and if I enter the second marker, the function of my first marker appears... At the moment my script is only Client Side: objecttosteal = createObject ( 2914, 2000, 1567, 14.5, 0, 0, 0 ) createBlipAttachedTo ( objecttosteal, 53 ) local attachedmarker = createMarker ( 2000, 1567, 13, "cylinder", 1.5, 0, 255, 255, 150 ) attachElements ( attachedmarker, objecttosteal, 0, 0, 0 ) armyblip = createBlip(2294, 2459, 10, 44) function chooseteam () local x,y = guiGetScreenSize() TeamWindow = guiCreateWindow ( 0.25, 0.25, 0.4, 0.4, "BF3 'Capture the Flag' by AlexWo", true ) TeamPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, TeamWindow ) TeamTab = guiCreateTab( "Choose Team", TeamPanel ) --Team Choose Labels Text local localPlayerName = getPlayerName(getLocalPlayer()) modinfo = guiCreateLabel(0.39, 0.95, 0.9, 0.2, "Capture the Flag - by AlexWo", true, TeamTab) guiLabelSetColor (modinfo, 255, 0, 0) namelabel = guiCreateLabel(0.02, 0.1, 0.9, 0.2, "Welcome " ..localPlayerName.."!", true, TeamTab) chooseateam = guiCreateLabel(0.02, 0.16, 0.9, 0.2, "Please Choose a Team!", true, TeamTab) guiLabelSetColor (chooseateam, 255, 255, 0) guiLabelSetColor (namelabel, 255, 255, 0) --Pictures guiCreateStaticImage( 480, 30, 250, 120, "images/dogtagctf.png", false, TeamTab ) --Task Descriptiont tasktext1 = guiCreateLabel(0.25, 0.3, 0.9, 0.2, "Your Task is to steal the Flag of the other Team!", true, TeamTab) tasktext2 = guiCreateLabel(0.25, 0.35, 0.9, 0.2, "Be careful, they might steal your Flag, too!", true, TeamTab) tasktext3 = guiCreateLabel(0.25, 0.4, 0.9, 0.2, "Try to stop them!", true, TeamTab) guiLabelSetColor (tasktext1, 0, 255, 150) guiLabelSetColor (tasktext2, 0, 255, 150) guiLabelSetColor (tasktext3, 0, 255, 150) ArmyRadioButton = guiCreateRadioButton(10,80,120,32,"Army",false, TeamTab) guiRadioButtonSetSelected(ArmyRadioButton,true) TerroristsRadioButton = guiCreateRadioButton(10,120,120,32,"Terrorists",false, TeamTab) exitbutton = guiCreateButton( 0.6, 0.8, 0.3, 0.10, "Cancel", true, TeamTab ) choosebutton = guiCreateButton( 0.1, 0.8, 0.3, 0.10, "Choose", true, TeamTab) showCursor(true) end addCommandHandler("bf", chooseteam) function closegui (state) if state == "left" then if source == exitbutton then guiSetVisible(TeamWindow , false) showCursor(false) end end end addEventHandler("onClientGUIClick", getRootElement(), closegui) function setTeam (state) if state == "left" then if source == choosebutton then if(guiRadioButtonGetSelected(ArmyRadioButton))then triggerServerEvent("giveEquipmentLS", getLocalPlayer(), thePlayer) guiSetVisible(TeamWindow, false) showCursor(false) elseif(guiRadioButtonGetSelected(TerroristsRadioButton))then triggerServerEvent("giveEquipmentSF", getLocalPlayer(), thePlayer) guiSetVisible(TeamWindow, false) showCursor(false) end end end end addEventHandler("onClientGUIClick", getRootElement(), setTeam) function attachobjectterror() attachElements ( objecttosteal, localPlayer, 0.5, 0, -0.5 ) setMarkerColor ( attachedmarker, 0, 255, 0, 0 ) end function attachobjectarmy() if isPedInVehicle(localPlayer) then outputChatBox("You can't use Vehicles to steal the Flag!", 255, 0, 0) else attachElements ( objecttosteal, localPlayer, 0.5, 0, -0.5 ) setMarkerColor ( attachedmarker, 0, 255, 0, 0 ) outputChatBox("The Army picked up the Flag!", 255, 255, 0) armymarker() end end function armymarker() destinationmarkerarmy = createMarker( 2294, 2459, 10, "cylinder", 2, 255, 255, 255, 150, localPlayer ) if isElementWithinMarker (destinationmarkerarmy, localPlayer) then outputChatBox("The Army Team reached their Marker", 255, 255, 255) end end addEventHandler("onClientMarkerHit", destinationmarkerarmyt, givepoints) function givepoints() outputChatBox("Congratz", 255, 255, 255) end function getModelID(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then theSkin = getElementModel ( getLocalPlayer() ) if (theSkin == 287) then attachobjectarmy() end end end addEventHandler("onClientMarkerHit", getRootElement(), getModelID) function detachbyenteringVehicles() local x,y,z = getElementPosition( objecttosteal ) if isElementAttached ( objecttosteal ) then detachElements ( objecttosteal, localPlayer ) setElementPosition ( objecttosteal, x +2, y, z -0.5 ) setMarkerColor ( attachedmarker, 0, 0, 255, 150 ) outputChatBox("Flag has been lost! Try to get it!", 100, 100, 255, localPlayer) destroyElement(destinationmarkerarmy) else outputChatBox("You entered a Vehicle", 0, 255, 255, localPlayer) end end addEventHandler("onClientPlayerVehicleEnter",getRootElement(),detachbyenteringVehicles) By the way the function of the second marker begins in line 97 Thank you
  2. AlexWo

    Problem with If

    Hello, I got a problem with an "If" I want that if an player enters a marker, his Skin will get checked and if his skin is 287 (Army skin) an object will get attached to him. Client Side with the Problem: function attachobjectterror() attachElements ( objecttosteal, localPlayer, 0.5, 0, -0.5 ) setMarkerColor ( attachedmarker, 0, 255, 0, 0 ) end function attachobjectarmy() attachElements ( objecttosteal, localPlayer, 0.5, 0, -0.5 ) setMarkerColor ( attachedmarker, 0, 255, 0, 0 ) end function getModelID(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then theSkin = getElementModel ( getLocalPlayer() ) if (theSkin == 287) then triggerEvent(attachobjectarmy) end end end addEventHandler("onClientMarkerHit", getRootElement(), getModelID) I'm not sure how to solve that Problem... (at line 17) Thank you for helping
  3. Hi I made some Vehicle Spawnmakers and now I have the problem that if a player is in a vehicle and hits the marker he get the VehicleSelect GUI. I don't want that... I tried already with some If clauses but it didn't worked. This is the part of my Client script where I placed the IF: function PoliceGUI (hitPlayer, matchingDimension ) if isPedInVehicle ( hitPlayer) then outputChatBox ( getPlayerName(hitPlayer) .. ", you have to leave your vehicle!", 255, 255, 0 ) else --Message that you enered the Marker outputChatBox ( getPlayerName(hitPlayer) .. ", you entered the Police-Job Marker", 255, 255, 0 ) --Window/GUI policeWindow = guiCreateWindow ( 0.25, 0.25, 0.4, 0.4, "Policejob", true ) --Tap Panel policePanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, policeWindow ) --Tab's policeMap = guiCreateTab( "Job Information", policePanel ) scriptinformation = guiCreateTab( "Script Information", policePanel ) --PoliceTab guiCreateLabel(0.02, 0.04, 0.94, 0.2, "Welcome to the Police Department", true, policeMap) guiCreateLabel(0.02, 0.08, 0.94, 0.92, "Press 'Accept' to accept the Job and get your Equipment", true, policeMap) guiCreateLabel(0.02, 0.12, 0.94, 0.92, "Press 'Exit' to close this gui and exit", true, policeMap) guiCreateLabel(0.065, 0.5, 0.94, 0.92, "Please choose a Skin:", true, policeMap) guiCreateStaticImage( 350, 75, 350, 175, "images/police-tape.png", false, policeMap ) LS = guiCreateRadioButton(50,200,100,16,"LS Skin",false, policeMap) guiRadioButtonSetSelected(LS,true) SF = guiCreateRadioButton(50,220,100,16,"SF Skin",false, policeMap) LV = guiCreateRadioButton(50,240,100,16,"LV Skin", false, policeMap) exitbutton = guiCreateButton( 0.5, 0.85, 0.2, 0.1, "Exit", true, policeMap ) acceptbutton = guiCreateButton( 0.1, 0.85, 0.2, 0.1, "Accept", true, policeMap ) showCursor ( true ) --ScriptInformationTab guiCreateLabel(0.02, 0.04, 0.94, 0.2, "This script is made by Alexander Wolf©", true, scriptinformation) guiCreateLabel(0.02, 0.08, 0.94, 0.2, "Do you like my script? Visit my Website alexwo.com/scripting for more!", true, scriptinformation) end end Maybe you can help me This is my whole Client Side Script: markers = { createMarker( -1620, 685, 6, "cylinder", 1.5, 0, 0, 255, 100), createMarker( 2242, 2450, 9.75, "cylinder", 1.5 , 0, 0, 255, 100), createMarker( 1555, -1675.5, 15.2, "cylinder", 1.5, 0, 0, 255, 100) } vehiclemarkers = { createMarker( 1556, -1612, 12.5, "cylinder", 1.5, 0, 0, 255, 100), createMarker( 1566, -1612, 12.5, "cylinder", 1.5, 0, 0, 255, 100) } LSPoliceBlip = createBlip( 1554, -1675, 15, 30, 2) SFPoliceBlip = createBlip( -1620, 685, 8, 30, 2) LVPoliceBlip = createBlip( 2242, 2450, 11, 30, 2) addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) for _, marker in ipairs ( markers ) do addEventHandler ( "onClientMarkerHit", marker, PoliceGUI ) end end ) addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) for _, marker in ipairs ( vehiclemarkers ) do addEventHandler ( "onClientMarkerHit", marker, vehiclegui ) end end ) function PoliceGUI (hitPlayer, matchingDimension ) PolicePlayer = getLocalPlayer() if isPedInVehicle ( PolicePlayer) then outputChatBox ( getPlayerName(PolicePlayer) .. ", you entered the Police-Job Marker", 255, 255, 0 ) else --Message that you enered the Marker outputChatBox ( getPlayerName(hitPlayer) .. ", you entered the Police-Job Marker", 255, 255, 0 ) --Window/GUI policeWindow = guiCreateWindow ( 0.25, 0.25, 0.4, 0.4, "Policejob", true ) --Tap Panel policePanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, policeWindow ) --Tab's policeMap = guiCreateTab( "Job Information", policePanel ) scriptinformation = guiCreateTab( "Script Information", policePanel ) --PoliceTab guiCreateLabel(0.02, 0.04, 0.94, 0.2, "Welcome to the Police Department", true, policeMap) guiCreateLabel(0.02, 0.08, 0.94, 0.92, "Press 'Accept' to accept the Job and get your Equipment", true, policeMap) guiCreateLabel(0.02, 0.12, 0.94, 0.92, "Press 'Exit' to close this gui and exit", true, policeMap) guiCreateLabel(0.065, 0.5, 0.94, 0.92, "Please choose a Skin:", true, policeMap) guiCreateStaticImage( 350, 75, 350, 175, "images/police-tape.png", false, policeMap ) LS = guiCreateRadioButton(50,200,100,16,"LS Skin",false, policeMap) guiRadioButtonSetSelected(LS,true) SF = guiCreateRadioButton(50,220,100,16,"SF Skin",false, policeMap) LV = guiCreateRadioButton(50,240,100,16,"LV Skin", false, policeMap) exitbutton = guiCreateButton( 0.5, 0.85, 0.2, 0.1, "Exit", true, policeMap ) acceptbutton = guiCreateButton( 0.1, 0.85, 0.2, 0.1, "Accept", true, policeMap ) showCursor ( true ) --ScriptInformationTab guiCreateLabel(0.02, 0.04, 0.94, 0.2, "This script is made by Alexander Wolf©", true, scriptinformation) guiCreateLabel(0.02, 0.08, 0.94, 0.2, "Do you like my script? Visit my Website alexwo.com/scripting for more!", true, scriptinformation) end end function wclose (state) if state == "left" then if source == exitbutton then guiSetVisible(policeWindow, false) showCursor(false) end end end addEventHandler("onClientGUIClick", getRootElement(), wclose) function acceptjob (state) if state == "left" then if source == acceptbutton then if(guiRadioButtonGetSelected(LS))then triggerServerEvent("giveEquipmentLS", getLocalPlayer(), thePlayer) guiSetVisible(policeWindow, false) showCursor(false) local acceptsound = playSound("sounds/accept.mp3") elseif(guiRadioButtonGetSelected(SF))then triggerServerEvent("giveEquipmentSF", getLocalPlayer(), thePlayer) guiSetVisible(policeWindow, false) showCursor(false) local acceptsound = playSound("sounds/accept.mp3") guiSetVisible(policeWindow, false) showCursor(false) elseif(guiRadioButtonGetSelected(LV))then triggerServerEvent("giveEquipmentLV", getLocalPlayer(), thePlayer) guiSetVisible(policeWindow, false) showCursor(false) local acceptsound = playSound("sounds/accept.mp3") end end end end addEventHandler("onClientGUIClick", getRootElement(), acceptjob) function vehiclegui (hitPlayer, matchingDimension ) PoliceVehicleWindow = guiCreateWindow ( 0.25, 0.25, 0.4, 0.4, "Police Vehicles", true ) --Tap Panel PoliceVehiclePanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, PoliceVehicleWindow ) --Tab's PoliceVehicleMap = guiCreateTab( "Vehicle List", PoliceVehiclePanel ) --PoliceTab guiCreateLabel(0.02, 0.04, 0.94, 0.2, "Please choose a vehicle you want to spawn!", true, PoliceVehicleMap) --RadioButtons policecarls = guiCreateRadioButton(20,40,100,16,"Police Car LS",false, PoliceVehicleMap) guiRadioButtonSetSelected(policecarls,true) policecarsf = guiCreateRadioButton(20,60,100,16,"Police Car SF",false, PoliceVehicleMap) policecarlv = guiCreateRadioButton(20,80,100,16,"Police Car LV", false, PoliceVehicleMap) policeranger = guiCreateRadioButton(20,100,100,16,"Police Ranger", false, PoliceVehicleMap) hpv1000 = guiCreateRadioButton(20,120,100,16,"HPV1000", false, PoliceVehicleMap) --Buttons policevehicleexitbutton = guiCreateButton( 0.5, 0.85, 0.2, 0.1, "Exit", true, PoliceVehicleMap ) spawnbutton = guiCreateButton( 0.1, 0.85, 0.2, 0.1, "Spawn", true, PoliceVehicleMap ) --showCursor showCursor ( true ) end function PoliceVehicleGUIclose (state) if state == "left" then if source == policevehicleexitbutton then guiSetVisible(PoliceVehicleWindow, false) showCursor(false) end end end addEventHandler("onClientGUIClick", getRootElement(), PoliceVehicleGUIclose) function spawnpolicevehicle (state) if state == "left" then if source == spawnbutton then if(guiRadioButtonGetSelected(policecarls))then triggerServerEvent("spawnpolicecarls", getLocalPlayer(), thePlayer) guiSetVisible(PoliceVehicleWindow, false) showCursor(false) local acceptsound = playSound("sounds/accept.mp3") elseif(guiRadioButtonGetSelected(policecarsf))then triggerServerEvent("spawnpolicecarsf", getLocalPlayer(), thePlayer) guiSetVisible(PoliceVehicleWindow, false) showCursor(false) local acceptsound = playSound("sounds/accept.mp3") guiSetVisible(PoliceVehicleWindow, false) showCursor(false) elseif(guiRadioButtonGetSelected(policecarlv))then triggerServerEvent("spawnpolicecarlv", getLocalPlayer(), thePlayer) guiSetVisible(PoliceVehicleWindow, false) showCursor(false) local acceptsound = playSound("sounds/accept.mp3") elseif(guiRadioButtonGetSelected(policeranger))then triggerServerEvent("spawnpoliceranger", getLocalPlayer(), thePlayer) guiSetVisible(PoliceVehicleWindow, false) showCursor(false) local acceptsound = playSound("sounds/accept.mp3") elseif(guiRadioButtonGetSelected(hpv1000))then triggerServerEvent("spawnhpv1000", getLocalPlayer(), thePlayer) guiSetVisible(PoliceVehicleWindow, false) showCursor(false) local acceptsound = playSound("sounds/accept.mp3") end end end end addEventHandler("onClientGUIClick", getRootElement(), spawnpolicevehicle)
  4. It works! Thank you very much. What does exactly that addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) for _, marker in ipairs ( markers ) do addEventHandler ( "onClientMarkerHit", marker, PoliceGUI ) end end ) do?
  5. Hey, I got in my script 2 different marker. One of them opens a Job-GUI and the other one will open a Vehiclespawn-GUI. Now if I enter the second marker it opens the Job-GUI. I use as the event handler addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit ) "getRootElement". I think thats the problem but if I chage it and start it no GUI opens. Help would be great This is my whole clientside-script: markers = { createMarker( -1620, 685, 6, "cylinder", 1.5, 0, 0, 255, 100), createMarker( 2242, 2450, 9.75, "cylinder", 1.5 , 0, 0, 255, 100), createMarker( 1555, -1675.5, 15.2, "cylinder", 1.5, 0, 0, 255, 100) } vehiclemarkers = { createMarker( 1556, -1612, 12.5, "cylinder", 1.5, 0, 0, 255, 100), createMarker( 1566, -1612, 12.5, "cylinder", 1.5, 0, 0, 255, 100) } LSPoliceBlip = createBlip( 1554, -1675, 15, 30, 2) SFPoliceBlip = createBlip( -1620, 685, 8, 30, 2) LVPoliceBlip = createBlip( 2242, 2450, 11, 30, 2) function PoliceGUI (hitPlayer, matchingDimension ) --Message that you enered the Marker outputChatBox ( getPlayerName(hitPlayer) .. ", you entered the Police-Job Marker", 255, 255, 0 ) --Window/GUI policeWindow = guiCreateWindow ( 0.25, 0.25, 0.4, 0.4, "Policejob", true ) --Tap Panel policePanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, policeWindow ) --Tab's policeMap = guiCreateTab( "Job Information", policePanel ) scriptinformation = guiCreateTab( "Script Information", policePanel ) --PoliceTab guiCreateLabel(0.02, 0.04, 0.94, 0.2, "Welcome to the Police Department", true, policeMap) guiCreateLabel(0.02, 0.08, 0.94, 0.92, "Press 'Accept' to accept the Job and get your Equipment", true, policeMap) guiCreateLabel(0.02, 0.12, 0.94, 0.92, "Press 'Exit' to close this gui and exit", true, policeMap) guiCreateLabel(0.065, 0.5, 0.94, 0.92, "Please choose a Skin:", true, policeMap) guiCreateStaticImage( 350, 75, 350, 175, "images/police-tape.png", false, policeMap ) LS = guiCreateRadioButton(50,200,100,16,"LS Skin",false, policeMap) guiRadioButtonSetSelected(LS,true) SF = guiCreateRadioButton(50,220,100,16,"SF Skin",false, policeMap) LV = guiCreateRadioButton(50,240,100,16,"LV Skin", false, policeMap) exitbutton = guiCreateButton( 0.5, 0.85, 0.2, 0.1, "Exit", true, policeMap ) acceptbutton = guiCreateButton( 0.1, 0.85, 0.2, 0.1, "Accept", true, policeMap ) showCursor ( true ) --ScriptInformationTab guiCreateLabel(0.02, 0.04, 0.94, 0.2, "This script is made by Alexander Wolf©", true, scriptinformation) guiCreateLabel(0.02, 0.08, 0.94, 0.2, "Do you like my script? Visit my Website alexwo.com/scripting for more!", true, scriptinformation) end addEventHandler ( "onClientMarkerHit", getRootElement(), PoliceGUI ) function wclose (state) if state == "left" then if source == exitbutton then outputChatBox("You left the Job Marker "..getPlayerName(localPlayer).."!", 255, 100, 0) guiSetVisible(policeWindow, false) showCursor(false) end end end addEventHandler("onClientGUIClick", getRootElement(), wclose) function acceptjob (state) if state == "left" then if source == acceptbutton then if(guiRadioButtonGetSelected(LS))then triggerServerEvent("giveEquipmentLS", getLocalPlayer(), thePlayer) guiSetVisible(policeWindow, false) showCursor(false) local acceptsound = playSound("sounds/accept.mp3") elseif(guiRadioButtonGetSelected(SF))then triggerServerEvent("giveEquipmentSF", getLocalPlayer(), thePlayer) guiSetVisible(policeWindow, false) showCursor(false) local acceptsound = playSound("sounds/accept.mp3") guiSetVisible(policeWindow, false) showCursor(false) elseif(guiRadioButtonGetSelected(LV))then triggerServerEvent("giveEquipmentLV", getLocalPlayer(), thePlayer) guiSetVisible(policeWindow, false) showCursor(false) local acceptsound = playSound("sounds/accept.mp3") end end end end addEventHandler("onClientGUIClick", getRootElement(), acceptjob)
  6. Thanks for the very fast answer But what exactly will happen if I make it not "local"?
  7. Hey I have a problem that my gui don't disapear when i click on the exit button Script(client): LSPolice = createMarker( 1554, -1675, 15.28, "cylinder", 1.5, 0, 0, 255) function MarkerHit ( hitPlayer, matchingDimension ) outputChatBox ( getPlayerName(hitPlayer) .. ", you entered the Police-Job Marker in LS", 255, 255, 0 ) local policeWindow = guiCreateWindow ( 0.25, 0.25, 0.4, 0.4, "Policejob LS", true ) local policePanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, policeWindow ) -- create a tab panel which fills the whole window local policeMap = guiCreateTab( "Job Information", policePanel ) guiCreateLabel(0.02, 0.04, 0.94, 0.2, "Welcome to the Police Department in Los Santos", true, policeMap) guiCreateLabel(0.02, 0.08, 0.94, 0.92, "Press 'Accept' to accept the Job and get your Equipment", true, policeMap) guiCreateLabel(0.02, 0.12, 0.94, 0.92, "Press 'Exit' to close this gui and exit", true, policeMap) exitbutton = guiCreateButton( 0.5, 0.5, 0.1, 0.05, "Exit", true, policeMap ) acceptbutton = guiCreateButton( 0.3, 0.5, 0.1, 0.05, "Accept", true, policeMap ) showCursor ( true ) end addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit ) function wclose(state) if state == "left" then if source == exitbutton then guiSetVisible(policeWindow, false) showCursor(false) end end end addEventHandler("onClientGUIClick", getRootElement(), wclose) Would be pretty cool if somebody could help me
  8. Well if you know how to script you could make your own Gamemode.
  9. Yay it works now as I wanted it to work Thank you very much
  10. Ok it works.... I changed the script to local locations = { { 1876, -1377, 13 }, { 1921, -1792, 13 }, { 2000, -2041, 13 } } function spawnVan () local x, y, z = unpack ( locations [ math.random ( 1, #locations ) ] ) misteryvan = createVehicle (482, x, y, z ) blip = createBlipAttachedTo ( misteryvan, 37 ) end addEventHandler ( "onResourceStart", getRootElement(), spawnVan ) function givestuff (thePlayer) if isPedInVehicle ( thePlayer ) then destroyElement ( misteryvan ) end end addEventHandler ( "onPlayerVehicleEnter", root, givestuff ) but if I enter I don't get the money... I think the "thePlayer" is not matched correctly
  11. Hello, I played once on a Server and there was a script called "Mistery Van". The script spawns a vehicle on Random Locations. If you enter the Van it dissapears and you get some money, armor and so on... function spawnVan () misteryvan = createVehicle (482, x,y,z ) end addEventHandler ( "onResourceStart", getRootElement(), spawnVan ) function givestuff (thePlayer) givePlayerMoney(thePlayer, 5000) setPedArmor( thePlayer, 50) setPedHealth( thePlayer, 100) end addEventHandler ( "onPlayerVehicleEnter", root, givestuff ) Thats the script I got for now. I don't know how to set 10 various locations for the van, and how to make it random. Thank you for helping me
  12. Wow, the scripts look amazing Thank you for the Link