SA-MP Forums Archive
[HELP] How to make a gang car. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] How to make a gang car. (/showthread.php?tid=107230)



[HELP] How to make a gang car. - ModernRP - 08.11.2009

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,


Re: [HELP] How to make a gang car. - retart441 - 08.11.2009

How are you defining the mafia team?


Re: [HELP] How to make a gang car. - ModernRP - 08.11.2009

if I understand u right, #define COLOR_MAFIA 0x212121AA


Re: [HELP] How to make a gang car. - Lajko1 - 08.11.2009

nope , serch for gTeam or something like this ...


Re: [HELP] How to make a gang car. - retart441 - 08.11.2009

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



Re: [HELP] How to make a gang car. - ModernRP - 08.11.2009

Haven't got gTeam in my script


Re: [HELP] How to make a gang car. - retart441 - 08.11.2009

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


Re: [HELP] How to make a gang car. - ModernRP - 08.11.2009

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)
		{