SA-MP Forums Archive
[HELP]Gangcar - 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]Gangcar (/showthread.php?tid=106676)



[HELP]Gangcar - Lilcuete - 04.11.2009

Can someone please tell me how to make gangcars thanks


Re: [HELP]Gangcar - Lilcuete - 04.11.2009

Please someone reply


Re: [HELP]Gangcar - retart441 - 04.11.2009

Team cars?

only team 1 can get in team 1 cars?
and if another team tries to get in it kicks them out?


Re: [HELP]Gangcar - Lilcuete - 04.11.2009

Yes dats waht i mean



Re: [HELP]Gangcar - Globe2009 - 04.11.2009

Код:
forward IsAGangCar(carid);
forward IsAGangCar2(carid);
forward IsAGangCar3(carid);
forward IsAGangCar4(carid);
forward IsAGangCar5(carid);
Код:
new GangCar[MAX_PLAYERS];
Код:
public IsAGangCar(carid)
{
if(carid >= [ID] && carid <= [ID])
	{
		return 1;
	}
	return 0;
}

public IsAGangCar2(carid)
{
if(carid >= [ID] && carid <= [ID])
	{
		return 1;
	}
	return 0;
}

public IsAGangCar3(carid)
{
if(carid >= [ID] && carid <= [ID])
	{
		return 1;
	}
	return 0;
}

public IsAGangCar4(carid)
{
if(carid >= [ID] && carid <= [ID])
	{
		return 1;
	}
	return 0;
}

public IsAGangCar5(carid)
{
if(carid >= [ID] && carid <= [ID])
	{
		return 1;
	}
	return 0;
}
just remove [ID] and replace it with the vehicle id like 174
EDIT: oops sorry mate forgot this bit that says they cant drive it
Код:
		if(IsAGangCar(newcar))
		{
		  if(PlayerInfo[playerid][pLeader] == 5||PlayerInfo[playerid][pMember] == ?) { }
		  else {
	    RemovePlayerFromVehicle(playerid);
	    SendClientMessage(playerid, COLOR_GREY,"You don't have keys of this vehicle.");}
		}
		if(IsAGangCar2(newcar))
		{
		  if(PlayerInfo[playerid][pLeader] == 6||PlayerInfo[playerid][pMember] == ?) { }
		  else {
	    RemovePlayerFromVehicle(playerid);
	    SendClientMessage(playerid, COLOR_GREY,"You don't have keys of this vehicle.");}
		}
		if(IsAGangCar3(newcar))
		{
		  if(PlayerInfo[playerid][pLeader] == 14||PlayerInfo[playerid][pMember] == ?) { }
		  else {
	    RemovePlayerFromVehicle(playerid);
	    SendClientMessage(playerid, COLOR_GREY,"You don't have keys of this vehicle.");}
		}
		if(IsAGangCar4(newcar))
		{
		  if(PlayerInfo[playerid][pLeader] == 15||PlayerInfo[playerid][pMember] == ?) { }
		  else {
	    RemovePlayerFromVehicle(playerid);
	    SendClientMessage(playerid, COLOR_GREY,"You don't have keys of this vehicle.");}
		}
		if(IsAGangCar5(newcar))
		{
		  if(PlayerInfo[playerid][pLeader] == 16||PlayerInfo[playerid][pMember] == ?) { }
		  else {
	    RemovePlayerFromVehicle(playerid);
	    SendClientMessage(playerid, COLOR_GREY,"You don't have keys of this vehicle.");}
		}
replace the ? with the gangmembers id


Re: [HELP]Gangcar - retart441 - 05.11.2009

Lmfao you beat me to it. But Ya he looks like hes got the code for ya.


Re: [HELP]Gangcar - Peter_Corneile - 05.11.2009

Quote:
Originally Posted by Globe2009
Код:
forward IsAGangCar(carid);
forward IsAGangCar2(carid);
forward IsAGangCar3(carid);
forward IsAGangCar4(carid);
forward IsAGangCar5(carid);
Код:
new GangCar[MAX_PLAYERS];
Код:
public IsAGangCar(carid)
{
if(carid >= [ID] && carid <= [ID])
	{
		return 1;
	}
	return 0;
}

public IsAGangCar2(carid)
{
if(carid >= [ID] && carid <= [ID])
	{
		return 1;
	}
	return 0;
}

public IsAGangCar3(carid)
{
if(carid >= [ID] && carid <= [ID])
	{
		return 1;
	}
	return 0;
}

public IsAGangCar4(carid)
{
if(carid >= [ID] && carid <= [ID])
	{
		return 1;
	}
	return 0;
}

public IsAGangCar5(carid)
{
if(carid >= [ID] && carid <= [ID])
	{
		return 1;
	}
	return 0;
}
just remove [ID] and replace it with the vehicle id like 174
EDIT: oops sorry mate forgot this bit that says they cant drive it
Код:
		if(IsAGangCar(newcar))
		{
		  if(PlayerInfo[playerid][pLeader] == 5||PlayerInfo[playerid][pMember] == ?) { }
		  else {
	    RemovePlayerFromVehicle(playerid);
	    SendClientMessage(playerid, COLOR_GREY,"You don't have keys of this vehicle.");}
		}
		if(IsAGangCar2(newcar))
		{
		  if(PlayerInfo[playerid][pLeader] == 6||PlayerInfo[playerid][pMember] == ?) { }
		  else {
	    RemovePlayerFromVehicle(playerid);
	    SendClientMessage(playerid, COLOR_GREY,"You don't have keys of this vehicle.");}
		}
		if(IsAGangCar3(newcar))
		{
		  if(PlayerInfo[playerid][pLeader] == 14||PlayerInfo[playerid][pMember] == ?) { }
		  else {
	    RemovePlayerFromVehicle(playerid);
	    SendClientMessage(playerid, COLOR_GREY,"You don't have keys of this vehicle.");}
		}
		if(IsAGangCar4(newcar))
		{
		  if(PlayerInfo[playerid][pLeader] == 15||PlayerInfo[playerid][pMember] == ?) { }
		  else {
	    RemovePlayerFromVehicle(playerid);
	    SendClientMessage(playerid, COLOR_GREY,"You don't have keys of this vehicle.");}
		}
		if(IsAGangCar5(newcar))
		{
		  if(PlayerInfo[playerid][pLeader] == 16||PlayerInfo[playerid][pMember] == ?) { }
		  else {
	    RemovePlayerFromVehicle(playerid);
	    SendClientMessage(playerid, COLOR_GREY,"You don't have keys of this vehicle.");}
		}
replace the ? with the gangmembers id
I dont think this will work in a non-GF script


Re: [HELP]Gangcar - Globe2009 - 05.11.2009

yea your gona have to edit it abit to match your server but the codes there for you
sorry mate its the best i could do lol

maybe ret can sort you out


Re: [HELP]Gangcar - retart441 - 05.11.2009

Well if Lilcuete is editing a game mode, I could help if he posts which one.

Once he answered I'll play around with the one above.


Re: [HELP]Gangcar - Globe2009 - 05.11.2009

not thread stealing but are you any good with virtual worlds?