yousseftawab Posted May 2, 2012 Share Posted May 2, 2012 I made a spawn marker but I want it to spawn only when someone from the Armed Forces Team steps in But it's not working what's wrong with it? --server sided local vehicleMarker = createMarker(208.60000610352, 1920.6999511719, 16.60000038147, 'cylinder', 2.0, 40, 73, 0, 200 ) function vehicleMarkerHit ( hitElement, matchingDimension ) if getPlayerTeam(source) == ("Armed Forces") then if getElementType ( hitElement ) == "player" and not isPedInVehicle (hitElement) then local vehicle = createVehicle ( 470, 208.60000610352, 1920.6999511719, 16.60000038147, 0, 0, 90 ) warpPedIntoVehicle(hitElement, vehicle) else end end end addEventHandler( "onMarkerHit", vehicleMarker , vehicleMarkerHit ) Link to comment
Al3grab Posted May 2, 2012 Share Posted May 2, 2012 local vehicleMarker = createMarker(208.60000610352, 1920.6999511719, 16.60000038147, 'cylinder', 2.0, 40, 73, 0, 200 ) function vehicleMarkerHit ( hitElement, matchingDimension ) local playerTeam = getPlayerTeam(hiElement) if ( playerTeam ) then local teamName = getTeamName(playerTeam) if ( teamName and teamName == "Armed Forces" ) then if ( getElementType ( hitElement ) == "player" and not isPedInVehicle (hitElement) ) then local theNewVeh = createVehicle ( 470, 208.60000610352, 1920.6999511719, 16.60000038147, 0, 0, 90 ) if theNewVeh then warpPedIntoVehicle(hitElement, theNewVeh) end end end end end addEventHandler( "onMarkerHit", vehicleMarker , vehicleMarkerHit ) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now