[HELP] How to make a gang car.
#1

Hello,
How do I make a car enterable for one gang only?

I've already tried to do it , but it only says for example: Vehicle belongs to the mafia. But if ur not a mafia u can still drive in it.
How to change it and make the car "drive-able" for the mafia only?

Thanks,
Reply
#2

How are you defining the mafia team?
Reply
#3

if I understand u right, #define COLOR_MAFIA 0x212121AA
Reply
#4

nope , serch for gTeam or something like this ...
Reply
#5

Quote:
Originally Posted by ModernRP
if I understand u right, #define COLOR_MAFIA 0x212121AA
No I mean what variable is the mafia.

Like my factions for the RP server I'm making are shown in the script like.

Код:
gTeam[playerid] = 1;
- For Faction 1.

Is yours like
Код:
gTeam[playerid] = TEAM_MAFIA
Reply
#6

Haven't got gTeam in my script
Reply
#7

Quote:
Originally Posted by ModernRP
Haven't got gTeam in my script
Well lets see the code were you have only mafia can drive this car
Reply
#8

My GM is based in the SAGC, south africa gaming comunity, http://forum.sa-mp.com/index.php?topic=126113.0 .
Maybe this is easyer for you to help me.

Btw I've found this:

Код:
 if(DynamicCars[vehicleid-1][FactionCar] != 255 && !ispassenger)
	{
	  if(DynamicFactions[DynamicCars[vehicleid-1][FactionCar]][fType] == 1)
	  {
	    if(PlayerInfo[playerid][pFaction] != DynamicCars[vehicleid-1][FactionCar])
	    {
	      new Float:playerposx, Float:playerposy, Float:playerposz;
				GetPlayerPos(playerid, playerposx, playerposy, playerposz);
	 			if(PlayerInfo[playerid][pAdmin] == 0)
				{
					SetPlayerPos(playerid,playerposx, playerposy, playerposz);
				}
				format(string, sizeof(string), "[LSPD:] %s has been spotted attempting to steal a law enforcement vehicle", GetPlayerNameEx(playerid));
				SendFactionTypeMessage(1,COLOR_LSPD,string);
				new location[MAX_ZONE_NAME];
				GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
				format(string, sizeof(string), "[LSPD:] All units be on the lookout for %s - Person Last Seen: %s", GetPlayerNameEx(playerid),location);
				SendClientMessage(playerid,COLOR_WHITE,"[Info:] You have been spotted attempting to steal a law enforcement vehicle");
				SetPlayerWantedLevelEx(playerid,GetPlayerWantedLevel(playerid)+1);
	    }
	  }
		format(string, sizeof(string), "[Faction:] This vehicle belongs to the %s",DynamicFactions[DynamicCars[vehicleid-1][FactionCar]][fName]);
		SendClientMessage(playerid,COLOR_WHITE, string);
	}
	if(IsAPlane(vehicleid) || IsAHelicopter(vehicleid) && !ispassenger)
 	{
		new Float:playerposx, Float:playerposy, Float:playerposz;
		GetPlayerPos(playerid, playerposx, playerposy, playerposz);
 		if(PlayerInfo[playerid][pFlyLic] == 0)
		{
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)