will briggs Posted June 5, 2011 Share Posted June 5, 2011 Hi, I need to make a script that when a player walks into the marker it notifys him/her that they have joined a certain team. So for i have got this : local teamMarker = createMarker(1552.33, -1605.37, 12.382, 'cylinder', 2.0, 255, 0, 0, 150 ) function teamMarkerHit( hitElement, matchingDimension ) if getElementType( hitElement ) == "player" and not isPedInVehicle(hitElement) then setPlayerTeam ( source, Police ) elseif getElementType( hitElement ) == "vehicle" then end end addEventHandler( "onMarkerHit", teamMarker, teamMarkerHit ) I also need it to make the team everytime the server starts but im not sure how to do that. Thanks Link to comment
SDK Posted June 5, 2011 Share Posted June 5, 2011 local Police = createTeam("Police", 0, 0, 255) -- this will create the team everytime the script starts local teamMarker = createMarker(1552.33, -1605.37, 12.382, 'cylinder', 2.0, 255, 0, 0, 150 ) function teamMarkerHit( hitElement, matchingDimension ) if getElementType( hitElement ) == "player" and not isPedInVehicle(hitElement) then setPlayerTeam ( hitElement, Police) -- source is the marker in this event, hitElement is the player end end addEventHandler( "onMarkerHit", teamMarker , teamMarkerHit ) 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