How i make a gang cars
#3

Quote:
Originally Posted by 0ne
Save a vehicle where you would like to, then add it to your gamemode, Search for OnPlayerStateChange callback, in that callback write like this:



Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	if (newstate == PLAYER_STATE_DRIVER)
	{
		if (GetVehicleModel(GetPlayerVehicleID(playerid)) == gangcar1)
		{
			if(gTeam[playerid] == TEAM_YOURGANGNAME)
  		{
  		  return 1;
			}
			else if(gTeam[playerid] != TEAM_YOURGANGNAME)
			{
				SendClientMessage(playerid, COLOR_ORANGE, "[INFO] This car is only for gang members of YOURGANGNAME ");
				RemovePlayerFromVehicle(playerid);
			}
		}
	}
return 1;
}
Don't forget to add on top:

Код:
new gangcar;
OnGameModeInit:


Код:
gangcar = The addstaticvehicle function from savedpositions.txt
Thanke You Tnx you are best
Reply


Messages In This Thread
How i make a gang cars - by heroyou12 - 17.09.2009, 09:32
Re: How i make a gang cars - by 0ne - 17.09.2009, 09:35
Re: How i make a gang cars - by heroyou12 - 17.09.2009, 09:38
Re: How i make a gang cars - by heroyou12 - 17.09.2009, 09:47
Re: How i make a gang cars - by 0ne - 17.09.2009, 09:53
Re: How i make a gang cars - by heroyou12 - 17.09.2009, 09:59
Re: How i make a gang cars - by heroyou12 - 17.09.2009, 10:08

Forum Jump:


Users browsing this thread: 1 Guest(s)