Jump to content

Team veh.?


ThePhill97

Recommended Posts

Posted
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

╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗

║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║

║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║

║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║

╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝

«سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك»

M7mdAl7arthy : لتواصل سكايب

Posted

ThePhill, you are talking about entering vehicles?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

You want to restrict a particular vehicle model or a vehicle element itself?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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

Posted

╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗

║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║

║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║

║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║

╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝

«سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك»

M7mdAl7arthy : لتواصل سكايب

Posted

No, it can be used for some elements only.

Where do you have your vehicles created?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

You created the vehicles via createVehicle or with a map file?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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.

Posted
IDS = 
    { 
        [ "ID 1" ] = true, 
        [ "ID 2" ] = true, 
        [ "ID 3" ] = true, 
        [ "ID 4" ] = true, 
        [ "ID 5" ] = true 
    } 

That's what I meant.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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.

Posted

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}; 

If I helped you, please click the like button on the right ;) Thanks!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...