MasterTobi Posted March 14, 2009 Share Posted March 14, 2009 Hey i have two Teams (Team1 and Team2). Everyone of these Team is reported to have a NRG. But, Team1 is not permitted to drive the NRG from Team2 and Team2 is not permitted to drive the NRG from Team1. one can make one beside the vehicle ID carid ? also Vehicle ID = 454 and carid = 1 ? thx Tobi Link to comment
Gamesnert Posted March 14, 2009 Share Posted March 14, 2009 MTA uses elements. theVehicle=createVehicle(432,0,0,5) -- We create a vehicle, and save it in variable theVehicle outputChatBox(getVehicleName(theVehicle)) -- We'll output the vehicle's name, for pointless reasons However, you can use setElementData on a vehicle to set an "ID" field for instance. Or you can use setElementID, even easier. But I'll try to help you out on this one. You might want to use: - createVehicle (how else do you expect to create it, beside a map) - setElementID, setElementData or anything that might help - onVehicleStartEnter to check for the player's team and compare it with the team required to get onto it. If the team not is the same, then you can do cancelEvent() How to do it: Create a function that creates vehicles for teams. In it, you should do createVehicle, set element data (setElementData) to the team element (made with createTeam I guess?), and then use addEventHandler together with onVehicleStartEnter to check for the team. If you have problems with anything, feel free to ask. Link to comment
MasterTobi Posted March 14, 2009 Author Share Posted March 14, 2009 BIG THX im so stupid, i´m ever forget to insert <> the var value -.- THX 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