Posts: 265
Threads: 61
Joined: Apr 2008
Reputation:
0
ok in a rp game mod with car ids. how would u add a vehicel for a faction like grove liks useing addstaticvehicelex
Posts: 602
Threads: 3
Joined: Jun 2009
Reputation:
0
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");
}
}
}
Posts: 265
Threads: 61
Joined: Apr 2008
Reputation:
0
well im useing a rp gm lol so
Posts: 602
Threads: 3
Joined: Jun 2009
Reputation:
0
Well as i said it all depends on your gamemode. If its one you downloaded then ask whoever made it.
I was just showing you an example.
Posts: 265
Threads: 61
Joined: Apr 2008
Reputation:
0
i have no replies for a month so... and im new to scripting but i'am learning