[HELP]Gangcar
#1

Can someone please tell me how to make gangcars thanks
Reply
#2

Please someone reply
Reply
#3

Team cars?

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

Yes dats waht i mean
Reply
#5

Код:
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
Reply
#6

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

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
Reply
#8

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
Reply
#9

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.
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)