Add static vehicel
#2

All depends on your team system. If you have a team system already then post it otherwist heres a simple example.

PlayerTeam[MAX_PLAYERS];
VehicleTeam[MAX_VEHICLES];
#define Team0 0
#define Team1 1

public OnGameModeInit()
{
new vehicle = AddStaticVehicle(...);
VehicleTeam[vehicle] = Team0;
....
}
//I assume by a team vehicle you only want people on that team to be able to use it.
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
if(PlayerTeam[playerid] != VehicleTeam[GetPlayerVehicleID(playerid)])
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, 0xAA0000AA, "Vehicle does not match team");
}
}
}
Reply


Messages In This Thread
Add static vehicel - by robert4049 - 31.01.2010, 00:40
Re: Add static vehicel - by mansonh - 31.01.2010, 02:24
Re: Add static vehicel - by robert4049 - 31.01.2010, 02:49
Re: Add static vehicel - by mansonh - 31.01.2010, 02:51
Re: Add static vehicel - by robert4049 - 31.01.2010, 02:52

Forum Jump:


Users browsing this thread: 1 Guest(s)