ThePhill97 Posted January 8, 2013 Share Posted January 8, 2013 I have a team "Mafia" and I want to know how to make ONLY the members of this team enter, but anyone else can enter passenger? Is this possible Link to comment
abu5lf Posted January 8, 2013 Share Posted January 8, 2013 I have a team "Mafia" and I want to know how to make ONLY the members of this team enter, but anyone else can enter passenger? Is this possible Yes, it possible you must use: setAccountData getAccountData Link to comment
Castillo Posted January 8, 2013 Share Posted January 8, 2013 ThePhill, you are talking about entering vehicles? Link to comment
ThePhill97 Posted January 8, 2013 Author Share Posted January 8, 2013 ThePhill, you are talking about entering vehicles? Yeah Was a mistake I missed it out. Link to comment
Castillo Posted January 8, 2013 Share Posted January 8, 2013 You want to restrict a particular vehicle model or a vehicle element itself? Link to comment
ThePhill97 Posted January 8, 2013 Author Share Posted January 8, 2013 You want to restrict a particular vehicle model or a vehicle element itself? I have vehicles scripted in, however I want to make the cars only enterable by those in the team Link to comment
abu5lf Posted January 8, 2013 Share Posted January 8, 2013 onVehicleStartEnter getPlayerTeam Link to comment
ThePhill97 Posted January 8, 2013 Author Share Posted January 8, 2013 onVehicleStartEntergetPlayerTeam I can see how they go together, however I have in general a few mixed cars that I want only the team to be able to use, but with the onVehicleStartEnter and getPlayerTeam it only allows certain car ID's Link to comment
Castillo Posted January 8, 2013 Share Posted January 8, 2013 No, it can be used for some elements only. Where do you have your vehicles created? Link to comment
ThePhill97 Posted January 8, 2013 Author Share Posted January 8, 2013 No, it can be used for some elements only.Where do you have your vehicles created? What do you mean 'where'? Location? Script? Link to comment
Castillo Posted January 8, 2013 Share Posted January 8, 2013 You created the vehicles via createVehicle or with a map file? Link to comment
ThePhill97 Posted January 8, 2013 Author Share Posted January 8, 2013 You created the vehicles via createVehicle or with a map file? They are in a MAP file. Link to comment
Castillo Posted January 8, 2013 Share Posted January 8, 2013 Create a table, put inside it all the ID's that appear on your map file ( not the vehicle models, the id="blabla" ), when they try to enter ANY vehicle, check if the ID is on the table with: getElementID, if it is, then check if they are in "Mafia" team with: getPlayerTeam + getTeamName, if they aren't, cancel the event with: cancelEvent. Link to comment
ThePhill97 Posted January 8, 2013 Author Share Posted January 8, 2013 Create a table, put inside it all the ID's that appear on your map file ( not the vehicle models, the id="blabla" ), when they try to enter ANY vehicle, check if the ID is on the table with: getElementID, if it is, then check if they are in "Mafia" team with: getPlayerTeam + getTeamName, if they aren't, cancel the event with: cancelEvent. Create a table? Link to comment
Castillo Posted January 8, 2013 Share Posted January 8, 2013 http://lua-users.org/wiki/TablesTutorial Link to comment
ThePhill97 Posted January 8, 2013 Author Share Posted January 8, 2013 http://lua-users.org/wiki/TablesTutorial ...Makes no sense Link to comment
myonlake Posted January 8, 2013 Share Posted January 8, 2013 http://lua-users.org/wiki/TablesTutorial ...Makes no sense Don't even begin scripting or programming in general if you don't understand that - you need to have motivation and understanding. Arrays are important. Link to comment
ThePhill97 Posted January 8, 2013 Author Share Posted January 8, 2013 http://lua-users.org/wiki/TablesTutorial ...Makes no sense Don't even begin scripting or programming in general if you don't understand that - you need to have motivation and understanding. Arrays are important. Dont get me wrong, Im not a noob into scripting. Some would call it "advanced-medium" I know PAWN (SA-MP) C++ C# Visual Basic (vb6+) Batch Visual basic scripts Some java See, I'm not a nub. It's just my learning style isn't all reading. I need examples that I can kinda-relate to and in simple forms. Link to comment
Castillo Posted January 8, 2013 Share Posted January 8, 2013 IDS = { [ "ID 1" ] = true, [ "ID 2" ] = true, [ "ID 3" ] = true, [ "ID 4" ] = true, [ "ID 5" ] = true } That's what I meant. Link to comment
ThePhill97 Posted January 8, 2013 Author Share Posted January 8, 2013 IDS = { [ "ID 1" ] = true, [ "ID 2" ] = true, [ "ID 3" ] = true, [ "ID 4" ] = true, [ "ID 5" ] = true } That's what I meant. My brain clicked. Yes, I understand now. Thanks. Link to comment
myonlake Posted January 9, 2013 Share Posted January 9, 2013 I am not here to argue, but if you know all those languages, you should know arrays very well. C++ arrays are almost the same. int example[5] = {0, 1, 2, 3, 4}; 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