[GameMode] [GM] The Godfather
#18

Quote:
Originally Posted by vortexxx
I need help about yakuza gang cars and i want to make that only users in the yakuza gang can enter those cars plss help
Hey Vortexxx

Code:
public IsAYakuzaCar(carid)
{
  if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6) //Yakuza
  {
	new tmpcar = GetVehicleModel(carid);
	if(tmpcar==596 || tmpcar==598) <-- Change those Numbers to the Cars that yakuza can use only.
	{

		return 1;
	}
  }
  else
  {
  SendClientMessage(playerid, COLOR_YELLOW, "You are not member of the Yakuza Organisation!");
  RemovePlayerFromVehicle(playerid);
  }
	return 0;
}
It's late so i haven't even bothered to try compile it, but it should work!
put that code anywhere you want.
Also the
Code:
if(tmpcar==596 || tmpcar==598) <-- Change those Numbers to the Cars that yakuza can use only.
Will change all the vehicles that are the model ids: 596 and 598! so if you want to only assign 3 or 4 vehicles of those models you choose, you will have to use the "Newcar" function instead of tmpcar.
if you still don't understand PM me and i'll try to help ya out!

Now my problem:

Quote:

Hey everyone, i have a kind of a slight problem at the moment, my /rentcars command doesn't seem to work anymore, but it did before.
The problem is that when i enter a rentcar(yes i have edited IsARentCar[Huh?] to 91-109) i can drive it without using /rentcars to trigger the SetPlayerControllable.

Look this is my setup for the Rentcars

Code:
Code:
		if(newcar >= 91 && newcar <= 98)
		{
			if (HireCar[playerid] != newcar)
			{
				format(string, sizeof(string), "~w~You can Rent this car~n~Cost:~g~$%d~n~~w~To rent type ~g~/rentcar~w~~n~to get out type ~r~/exit",SBizzInfo[0][sbEntranceCost]);
				TogglePlayerControllable(playerid, 0);
				GameTextForPlayer(playerid, string, 5000, 3);
			}
		}
		if(newcar >= 99 && newcar <= 109)
		{
			if (HireCar[playerid] != newcar)
			{
				format(string, sizeof(string), "~w~You can Rent this car~n~Cost:~g~$%d~n~~w~To rent type ~g~/rentcar~w~~n~to get out type ~r~/exit",SBizzInfo[1][sbEntranceCost]);
				TogglePlayerControllable(playerid, 0);
				GameTextForPlayer(playerid, string, 5000, 3);
			}
		}
And the /rentcar command.

Code:
	if(strcmp(cmd, "/rentcar", true) == 0)
	{
    if(IsPlayerConnected(playerid))
		{
			if(GetPlayerVehicleID(playerid) >= 91 && GetPlayerVehicleID(playerid) <= 109)
			{
				new hirefee = HireCost(GetPlayerVehicleID(playerid));
				if(GetPlayerVehicleID(playerid) >= 91 && GetPlayerVehicleID(playerid) <= 98)
				{
					if(SBizzInfo[0][sbProducts] == 0)
					{
						GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
						return 1;
					}
					if(PlayerInfo[playerid][pSFPbiskey] == 0)
					{
						GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3);
						TogglePlayerControllable(playerid, 1);
						return 1;
					}
					if (GetPlayerMoney(playerid) < SBizzInfo[0][sbEntranceCost])
					{
						SendClientMessage(playerid, COLOR_GRAD2, "  You dont have that much cash !");
						return 1;
					}
					GivePlayerMoney(playerid,-SBizzInfo[0][sbEntranceCost]);
					SBizzInfo[0][sbTill] += SBizzInfo[0][sbEntranceCost];
					ExtortionSBiz(0, SBizzInfo[0][sbEntranceCost]);
					SBizzInfo[0][sbProducts]--;
				}
				if(GetPlayerVehicleID(playerid) >= 99 && GetPlayerVehicleID(playerid) <= 109)
				{
					if(SBizzInfo[1][sbProducts] == 0)
					{
						GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
						return 1;
					}
					if(PlayerInfo[playerid][pSFPbiskey] == 1)
					{
						GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3);
						TogglePlayerControllable(playerid, 1);
						return 1;
					}
					if (GetPlayerMoney(playerid) < SBizzInfo[1][sbEntranceCost])
					{
						SendClientMessage(playerid, COLOR_GRAD2, "  You dont have that much cash !");
						return 1;
					}
					GivePlayerMoney(playerid,-SBizzInfo[1][sbEntranceCost]);
					SBizzInfo[1][sbTill] += SBizzInfo[1][sbEntranceCost];
					ExtortionSBiz(1, SBizzInfo[1][sbEntranceCost]);
					SBizzInfo[1][sbProducts]--;
				}
				if(HireCar[playerid] != 299)
				{
					gCarLock[HireCar[playerid]] = 0;
					UnLockCar(HireCar[playerid]);
				}
				HireCar[playerid] = GetPlayerVehicleID(playerid);
				OnPropUpdate();
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				format(string, sizeof(string), "~w~We hope you enjoy ~n~the use of this car~n~To lock or unlock your car~n~type ~g~/lock~n~~w~please drive safely",hirefee);
				TogglePlayerControllable(playerid, 1);
				GameTextForPlayer(playerid, string, 5000, 3);
			}
		}
		return 1;
	}
anyone here that seems to know this problem or have a solution?
The problem appeared when i started to edit the whole gamemode from Las Venturas to San Fierro.
Please i really need some help, it's soon a new year and i promised the players that plays on it, that i'll solve the problem before 31.January! Tongue

Thanks!

Kind Regards,
Sinces Smiley

Reply


Messages In This Thread
[GM] The Godfather - by FeaR - 23.07.2007, 16:11
Re: [GM] The Godfather 2 - by wanTedh - 20.12.2008, 08:24
Re: [GM] The Godfather 2 - by Lewwy - 20.12.2008, 08:49
Re: [GM] The Godfather 2 - by LarzI - 20.12.2008, 09:17
Re: [GM] The Godfather 2 - by MenaceX^ - 20.12.2008, 10:36
Re: [GM] The Godfather 2 - by Borleon - 20.12.2008, 11:11
Re: [GM] The Godfather 2 - by MenaceX^ - 20.12.2008, 11:20
Re: [GM] The Godfather 2 - by Borleon - 20.12.2008, 11:29
Re: [GM] The Godfather 2 - by Brendan_Thomson - 20.12.2008, 12:23
Re: [GM] The Godfather 2 - by Borleon - 20.12.2008, 12:24
Re: [GM] The Godfather 2 - by Tez2k7 - 20.12.2008, 12:51
Re: [GM] The Godfather 2 - by CTCCoco - 21.12.2008, 09:15
Re: [GM] The Godfather - by LightFight™ - 23.12.2008, 22:22
Re: [GM] The Godfather - by n00b4life - 23.12.2008, 22:25
Re: [GM] The Godfather - by LightFight™ - 23.12.2008, 22:26
Re: [GM] The Godfather - by vortexxx - 23.12.2008, 23:14
Re: [GM] The Godfather - by n00b4life - 24.12.2008, 01:39
Re: [GM] The Godfather - by Sinces - 24.12.2008, 02:59
Re: [GM] The Godfather - by n00b4life - 24.12.2008, 04:18
Re: [GM] The Godfather - by Jaztek_Hodzic - 24.12.2008, 11:00
Re: [GM] The Godfather - by GaMeouT - 24.12.2008, 11:47
Re: [GM] The Godfather - by Hrvo182 - 24.12.2008, 13:33
Re: [GM] The Godfather - by Tez2k7 - 16.01.2009, 18:49
Re: [GM] The Godfather - by sebvarvar - 16.01.2009, 19:16
Re: [GM] The Godfather - by Snyper18 - 16.01.2009, 19:17
Re: [GM] The Godfather - by Tez2k7 - 16.01.2009, 19:29
Re: [GM] The Godfather - by Snyper18 - 16.01.2009, 19:33
Re: [GM] The Godfather - by sebvarvar - 16.01.2009, 19:48
Re: [GM] The Godfather - by LightFight™ - 16.01.2009, 20:47
Re: [GM] The Godfather - by Tez2k7 - 16.01.2009, 20:53
Re: [GM] The Godfather - by sebvarvar - 17.01.2009, 05:02
Re: [GM] The Godfather - by sebvarvar - 17.01.2009, 05:03
Re: [GM] The Godfather - by Vincentdu90 - 05.03.2009, 13:12
Re: [GM] The Godfather - by loT4r - 05.03.2009, 13:49
Re: [GM] The Godfather - by linxx - 06.03.2009, 01:46
Re: [GM] The Godfather - by DauerDicht - 06.03.2009, 20:13
Re: [GM] The Godfather - by MaickLeY17 - 06.03.2009, 21:19
Re: [GM] The Godfather - by Damon_Black - 07.03.2009, 01:41
Re: [GM] The Godfather - by Dol - 07.03.2009, 07:22
Re: [GM] The Godfather - by Karlip - 07.03.2009, 08:19
Re: [GM] The Godfather - by hide123 - 07.03.2009, 08:20
Re: [GM] The Godfather - by Dol - 07.03.2009, 08:36
Re: [GM] The Godfather - by shady91 - 02.12.2009, 19:45
Re: [GM] The Godfather - by jasonnw666 - 03.12.2009, 20:03
Re: [GM] The Godfather - by CameronF91 - 03.12.2009, 20:19
Re: [GM] The Godfather - by buonggiorno - 04.12.2009, 09:24
Re: [GM] The Godfather - by jasonnw666 - 04.12.2009, 19:00
Re: [GM] The Godfather - by jasonnw666 - 04.12.2009, 19:29
Re: [GM] The Godfather - by Correlli - 04.12.2009, 19:44
Re: [GM] The Godfather - by jasonnw666 - 04.12.2009, 20:40
Re: [GM] The Godfather - by MultiMaiGic - 05.12.2009, 03:14
Re: [GM] The Godfather - by jasonnw666 - 05.12.2009, 13:20
Re: [GM] The Godfather - by Fredy_Cole - 23.04.2010, 23:24
Re: [GM] The Godfather - by purplepker - 23.04.2010, 23:50
Re: [GM] The Godfather - by Calgon - 23.04.2010, 23:51
Re: [GM] The Godfather - by Fredy_Cole - 23.04.2010, 23:58
Re: [GM] The Godfather - by leo3412 - 24.04.2010, 12:27
Re: [GM] The Godfather - by Calgon - 24.04.2010, 12:27
Re: [GM] The Godfather - by IdanN - 24.04.2010, 12:35
Re: [GM] The Godfather - by Fredy_Cole - 24.04.2010, 12:48
Re: [GM] The Godfather - by igalsok - 24.04.2010, 13:26
Re: [GM] The Godfather - by shady91 - 24.04.2010, 14:26
Re: [GM] The Godfather - by Killa[DGZ] - 18.07.2010, 16:44
Re: [GM] The Godfather - by Francesco_Totti - 22.07.2010, 03:03
Re: [GM] The Godfather - by Lucca_dias - 22.07.2010, 03:40
Re: [GM] The Godfather - by Zays - 30.07.2010, 17:49
Re: [GM] The Godfather - by M3ntaL - 04.08.2010, 02:45
Re: [GM] The Godfather - by Malik_Henderson - 04.09.2010, 21:23
Re: [GM] The Godfather - by sickem - 04.09.2010, 21:25
Re: [GM] The Godfather - by Malik_Henderson - 04.09.2010, 21:38
Re: [GM] The Godfather - by sickem - 04.09.2010, 21:53
Re: [GM] The Godfather - by Malik_Henderson - 05.09.2010, 07:15
Re: [GM] The Godfather - by Malik_Henderson - 05.09.2010, 07:21
Re: [GM] The Godfather - by Ltz-boy - 06.09.2010, 13:54
Re: [GM] The Godfather - by Ricardo187 - 07.09.2010, 20:33
Re: [GM] The Godfather - by Brian_Furious - 07.09.2010, 20:43
Re: [GM] The Godfather - by Mimic - 07.09.2010, 21:08
Re: [GM] The Godfather - by Chinuc - 17.09.2010, 05:44
Re: [GM] The Godfather - by NO.L3O - 19.09.2010, 13:54
Re: [GM] The Godfather - by Liaamm - 19.09.2010, 13:59
Re: [GM] The Godfather - by ExeC - 20.01.2011, 09:54
Re: [GM] The Godfather - by ExeC - 20.01.2011, 10:15
Re: [GM] The Godfather - by und3rcore - 20.01.2011, 11:42
AW: [GM] The Godfather - by [GSF]xXaroxXx - 07.06.2011, 17:38
Re: [GM] The Godfather - by oNe_87 - 11.06.2011, 08:27
Re: [GM] The Godfather - by EterNo - 17.07.2011, 22:36
Re: [GM] The Godfather - by Finn707 - 02.04.2012, 16:25
Re: [GM] The Godfather - by Bar12 - 04.04.2012, 15:41
Re: [GM] The Godfather - by Jack_Madson - 09.04.2012, 15:29
Re: [GM] The Godfather - by the_zohan - 09.04.2012, 16:03
Re: [GM] The Godfather - by Faisal_khan - 12.04.2012, 18:56
Re: [GM] The Godfather - by Bar12 - 15.04.2012, 16:12
Re: [GM] The Godfather - by Joshman543 - 20.04.2012, 21:46
Re: [GM] The Godfather - by Pri3st - 20.04.2012, 21:53
Re: [GM] The Godfather - by Ainseri - 20.04.2012, 22:47
Re: [GM] The Godfather - by rEs - 21.04.2012, 15:28
Re: [GM] The Godfather - by MrGraphiiiX - 03.09.2012, 12:43
Re: [GM] The Godfather - by Rayansh - 03.09.2012, 15:06
Re: [GM] The Godfather - by shaniyal - 03.09.2012, 16:05
Re: [GM] The Godfather - by Cassy_ - 03.09.2012, 18:31
Re: [GM] The Godfather - by Mark Shade - 03.09.2012, 18:33
Re: [GM] The Godfather - by MrGraphiiiX - 04.09.2012, 18:35
Re: [GM] The Godfather - by razor steven - 04.09.2012, 19:14
Re: [GM] The Godfather - by MrGraphiiiX - 05.09.2012, 14:42
Re: [GM] The Godfather - by gR92 - 06.09.2012, 02:39
Re: [GM] The Godfather - by parames3010 - 07.09.2012, 13:40
Re: [GM] The Godfather - by aboa - 07.09.2012, 14:01
Re: [GM] The Godfather - by xeNium - 07.09.2012, 19:17
Re: [GM] The Godfather - by TheNoobWar - 06.10.2012, 04:17
Re: [GM] The Godfather - by gabitzu4ever - 07.10.2012, 08:03
Re: [GM] The Godfather - by AlexDarnley - 07.10.2012, 08:29
Re: [GM] The Godfather - by mirwelios - 17.11.2012, 04:54
Re: [GM] The Godfather - by Ketchup2012 - 31.12.2012, 09:05
Re: [GM] The Godfather - by SiRbEaSt - 31.12.2012, 12:56
AW: [GM] The Godfather - by 123xbatu - 13.01.2013, 16:11
Re: [GM] The Godfather - by changeME - 14.01.2013, 13:19
Re: [GM] The Godfather - by TwisTa98 - 14.01.2013, 13:30
Re: [GM] The Godfather - by DiGiTaL_AnGeL - 14.01.2013, 13:36
Re: [GM] The Godfather - by Feron - 14.01.2013, 20:59
Re: [GM] The Godfather - by ViruZz - 14.01.2013, 21:08
Re: [GM] The Godfather - by Smeagle - 01.04.2013, 15:48
Re: [GM] The Godfather - by Ryan_Bowe - 02.04.2013, 01:41
AW: [GM] The Godfather - by Star_Crepti - 16.04.2013, 15:44
Re: [GM] The Godfather 2 - by foxswal - 17.04.2013, 10:43
Re: [GM] The Godfather - by Ryan_Bowe - 15.08.2013, 18:17
Re: [GM] The Godfather - by gabitzu4ever - 15.08.2013, 18:18
Re: [GM] The Godfather - by DouglasRamirez - 17.10.2013, 09:58
Re: [GM] The Godfather - by Wizzy951 - 14.11.2013, 22:42
Re: [GM] The Godfather - by psoni9697 - 10.09.2014, 09:15
Re: [GM] The Godfather - by Airblog - 01.10.2014, 16:33
Re: [GM] The Godfather - by DraconianGamer - 05.02.2015, 19:25
Re: [GM] The Godfather - by ZombieNest - 06.02.2015, 15:43
Re: [GM] The Godfather - by LMaxCo - 15.02.2015, 12:07
Re: [GM] The Godfather - by Lucian50 - 19.02.2015, 14:53
Re: [GM] The Godfather - by Arastair - 19.02.2015, 15:58
Re : [GM] The Godfather - by Doranne - 19.02.2015, 16:12
Re: [GM] The Godfather - by Cheesus - 27.02.2015, 12:12
Re: [GM] The Godfather - by Simou - 02.03.2015, 10:20
Re: [GM] The Godfather - by DeadDon - 13.09.2015, 18:19
Re: [GM] The Godfather - by ognyanov - 13.09.2015, 18:51
Re: [GM] The Godfather - by Raiider - 13.09.2015, 19:53
Re: [GM] The Godfather - by Jamester - 13.09.2015, 21:05
Re: [GM] The Godfather - by Abagail - 06.10.2015, 23:52
Re: [GM] The Godfather - by [ND]xXZeusXx. - 05.11.2015, 18:24
Re: [GM] The Godfather - by Sew_Sumi - 05.11.2015, 18:41
Re: [GM] The Godfather - by [ND]xXZeusXx. - 05.11.2015, 18:46
Re: [GM] The Godfather - by Sew_Sumi - 05.11.2015, 18:52
Re: [GM] The Godfather - by N0FeaR - 05.11.2015, 22:26
Re: [GM] The Godfather - by Sew_Sumi - 05.11.2015, 23:56
Re: [GM] The Godfather - by [ND]xXZeusXx. - 06.11.2015, 05:30
Re: [GM] The Godfather - by Sew_Sumi - 06.11.2015, 18:58
Re: [GM] The Godfather - by Sew_Sumi - 03.01.2016, 07:12
Re: [GM] The Godfather - by TheMallard - 03.01.2016, 10:15
Re: [GM] The Godfather - by danialtv31 - 13.01.2016, 22:01
danialtv31 - by Sew_Sumi - 14.01.2016, 00:25
Re: [GM] The Godfather - by N0FeaR - 14.01.2016, 12:07
Re: [GM] The Godfather - by gatokpo - 08.03.2016, 01:30
Re: [GM] The Godfather - by TheMallard - 08.03.2016, 01:46
Re: [GM] The Godfather - by -CaRRoT - 08.03.2016, 02:22
Re: [GM] The Godfather - by Sew_Sumi - 08.03.2016, 02:45
Re: [GM] The Godfather - by MarkNelson - 17.03.2016, 16:07
Re: [GM] The Godfather - by N0FeaR - 17.03.2016, 16:54
Re: [GM] The Godfather - by Sew_Sumi - 17.03.2016, 17:36
Respuesta: [GM] The Godfather - by MateusMatrex - 07.04.2016, 15:12
Re: Respuesta: [GM] The Godfather - by Sew_Sumi - 07.04.2016, 15:31
Re: Respuesta: [GM] The Godfather - by N0FeaR - 07.04.2016, 15:48
Re: [GM] The Godfather - by Zorono - 07.04.2016, 17:08
Re: [GM] The Godfather - by LemMoN - 30.12.2016, 01:03
Re: [GM] The Godfather - by Sew_Sumi - 30.12.2016, 04:51
Re: [GM] The Godfather - by PolisManovic - 31.12.2016, 08:46
Re: [GM] The Godfather - by alnothron - 19.01.2018, 12:24
Re: [GM] The Godfather - by BulletRaja - 19.01.2018, 13:13
Re: [GM] The Godfather - by Grintch - 19.01.2018, 16:07
Re: [GM] The Godfather - by Mario_Bruss - 19.01.2018, 17:03
Re: [GM] The Godfather - by Meller - 19.01.2018, 18:18
Re: [GM] The Godfather - by PundacheMakalae - 19.01.2018, 18:37
Re: [GM] The Godfather - by aminchikokiller - 16.05.2018, 18:25
Re: [GM] The Godfather - by NotSteven - 21.05.2018, 03:26
Re: [GM] The Godfather - by MaazS - 21.05.2018, 03:51
Re: [GM] The Godfather - by GTLS - 21.05.2018, 06:36
Re: [GM] The Godfather - by BanSilog - 21.05.2018, 12:05
Re: [GM] The Godfather - by CodeStyle175 - 21.05.2018, 13:21
Re: [GM] The Godfather - by DeadDon - 21.05.2018, 14:19
Re: [GM] The Godfather - by Calgon - 21.05.2018, 15:19
Re: [GM] The Godfather - by alnothron - 16.07.2018, 13:33
Re: [GM] The Godfather - by Sons - 26.09.2018, 14:56
Re: [GM] The Godfather - by Mazio - 27.09.2018, 01:56
Re: [GM] The Godfather - by priyanshu - 29.09.2018, 05:07
Re: [GM] The Godfather - by Sons - 08.10.2018, 21:54

Forum Jump:


Users browsing this thread: 16 Guest(s)