v0nz Posted July 11, 2008 Share Posted July 11, 2008 Is there some sort of way to restrict cars to certain teams? Link to comment
Ace_Gambit Posted July 11, 2008 Share Posted July 11, 2008 Yes this is possible. Here's a very abstract example to give you an idea how it could be done. setElementParent(theVehicle, theTeam) -- make theTeam owner of this vehicle function onVehicleStartEnter(enteringPlayer, seat, jacked) if (getElementParent(source) ~= getPlayerTeam(enteringPlayer)) then -- check if the player is entering a car that is owned by his or her team cancelEvent() -- if not prevent the player from entering the vehicle end end This is one way of doing it. You should however take note that cancelling the onVehicleStartEnter is bugged in DP2. Somehow you can only cancel the event once. Link to comment
Recommended Posts