How i make a gang cars
#1

Hello, Does anyone can help me the question is how do I do gangi cars, I would like to add, however, if someone bothered to make me a script хppetusega

|I'm not a pro scripting|
Reply
#2

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

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




But Can you tell me how to make gang i mean team Can you help me i need the help you the how to add gang cars i add the new cars of police team anda can you help me more with make gang Ballas i dont have this on my pwn
Reply
#5

ontop:

Код:
new gTeam[MAX_PLAYERS];
Код:
#define TEAM_BALLAS 0
#define TEAM_GROVE 1
Replace yourgangname with one of these teams ex: TEAM_GROVE
Reply
#6

Quote:
Originally Posted by 0ne
ontop:

Код:
new gTeam[MAX_PLAYERS];
Код:
#define TEAM_BALLAS 0
#define TEAM_GROVE 1
Replace yourgangname with one of these teams ex: TEAM_GROVE
ok tnx
Reply
#7

how i add picture i want to show you my error
Reply


Forum Jump:


Users browsing this thread: 7 Guest(s)