Help please
#1

Hey all .

I really need some help.

I added some cars, but i want to add some cars for each time, that means only team members can use their own team cars .

If another player from another team trys to get inside the car, its send a message : "You are not a ...."

Waiting your answers, Thanks Anywayz.

Reply
#2

Код:
if(IsAGangCar(newcar))
		{
		  if(PlayerInfo[playerid][pLeader] == 5||PlayerInfo[playerid][pMember] == 5) { }
		  else {
	    RemovePlayerFromVehicle(playerid);
	    SendClientMessage(playerid, COLOR_GREY,"You don't have keys of this vehicle.");}
		}
Код:
public IsAGangCar(carid)
{
if(carid >= 160 && carid <= 163)
	{
		return 1;
	}
	return 0;
}
THAT'S AN EXEMPLE
Reply
#3

Hmm ... can you explain a little more ?
For example : The team name : TEAM_Pilot

The cars :

AddStaticVehicle(511,1878.3798,-2284.1506,13.5469,266.5646,86,70);
AddStaticVehicle(511,1875.7375,-2270.4543,12.9055,271.0290,86,70);
AddStaticVehicle(511,1867.9156,-2302.1968,12.9070,268.5708,86,70);

Can you work this for me ? then i'll know how to do the rest .
Thx
Reply
#4

the id of vehicle , u need to found them .. if ur doing new GM and u have juste those 3 vehicle the first one is ID=1 second ID=2 third ID=3 if you have 10 cars in ur gm already and wanna add them their will be ID=11 ID=12 ID=13 .. Give ID and ill begin it for you ..
Reply
#5

Quote:
Originally Posted by charles30
the id of vehicle , u need to found them .. if ur doing new GM and u have juste those 3 vehicle the first one is ID=1 second ID=2 third ID=3 if you have 10 cars in ur gm already and wanna add them their will be ID=11 ID=12 ID=13 .. Give ID and ill begin it for you ..
Yeah It's ID 1, 2, 3
Reply
#6

If that's the first Faction =>
Forward & New:
Код:
forward IsAGangCar(carid);

new GangCar[MAX_PLAYERS];
Код:
if(IsAGangCar(newcar))
		{
		  if(PlayerInfo[playerid][pLeader] == 1||PlayerInfo[playerid][pMember] == 1) { }
		  else {
	    RemovePlayerFromVehicle(playerid);
	    SendClientMessage(playerid, COLOR_GREY,"Your not in the FactionName.");}
		}
Код:
public IsAGangCar(carid)
{
if(carid >= 1 && carid <= 3)
	{
		return 1;
	}
	return 0;
}
Reply
#7

First faction ? you mean Team ?
Reply
#8

Yes ... Faction , Team , Groups , Gang all the same x)
Reply
#9

Quote:
Originally Posted by charles30
Yes ... Faction , Team , Groups , Gang all the same x)
Well the pilot team is ID 9 faction .
What to do ?
Reply
#10

if(IsAGangCar(newcar))
{
if(PlayerInfo[playerid][pLeader] == 9||PlayerInfo[playerid][pMember] == 9) { }
else {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY,"Your not in the Pilots.");}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)