ThePhill97 Posted January 8, 2013 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
abu5lf Posted January 8, 2013 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
Castillo Posted January 8, 2013 Posted January 8, 2013 ThePhill, you are talking about entering vehicles?
ThePhill97 Posted January 8, 2013 Author Posted January 8, 2013 ThePhill, you are talking about entering vehicles? Yeah Was a mistake I missed it out.
Castillo Posted January 8, 2013 Posted January 8, 2013 You want to restrict a particular vehicle model or a vehicle element itself?
ThePhill97 Posted January 8, 2013 Author 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
ThePhill97 Posted January 8, 2013 Author 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
Castillo Posted January 8, 2013 Posted January 8, 2013 No, it can be used for some elements only. Where do you have your vehicles created?
ThePhill97 Posted January 8, 2013 Author 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?
Castillo Posted January 8, 2013 Posted January 8, 2013 You created the vehicles via createVehicle or with a map file?
ThePhill97 Posted January 8, 2013 Author Posted January 8, 2013 You created the vehicles via createVehicle or with a map file? They are in a MAP file.
Castillo Posted January 8, 2013 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.
ThePhill97 Posted January 8, 2013 Author 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?
ThePhill97 Posted January 8, 2013 Author Posted January 8, 2013 http://lua-users.org/wiki/TablesTutorial ...Makes no sense
myonlake Posted January 8, 2013 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.
ThePhill97 Posted January 8, 2013 Author 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.
Castillo Posted January 8, 2013 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.
ThePhill97 Posted January 8, 2013 Author 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.
myonlake Posted January 9, 2013 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};
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