enum TeamCars{team1,team2} // you can add , other team // |
new team1[50]; // 50 the number max of veh // new team2[50]; |
team1[0] = AddStaticVehicle(519,1806.1066,-2406.8108,14.4731,220.1901,1,1); team1[1] = AddStaticVehicle(519,1851.0873,-2397.0818,14.4738,221.0776,1,1); team1[2] = AddStaticVehicle(519,1881.2903,-2364.6726,14.4760,231.6925,1,1); team1[3] = AddStaticVehicle(593,1990.4940,-2400.4700,14.0069,126.8314,58, ![]() |
team2[0] = AddStaticVehicle(519,1806.1066,-2406.8108,14.4731,220.1901,1,1); team2[1] = AddStaticVehicle(519,1851.0873,-2397.0818,14.4738,221.0776,1,1); team2[2] = AddStaticVehicle(519,1881.2903,-2364.6726,14.4760,231.6925,1,1); team2[3] = AddStaticVehicle(593,1990.4940,-2400.4700,14.0069,126.8314,58, ![]() |
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == 2)
{
new CarCheck = GetPlayerVehicleID(playerid);
if(CarCheck == team1[0] || CarCheck == team1[1] || CarCheck == team1[2] || CarCheck == team1[3] )
{
if(gTeam[playerid] != team1)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, 0xFFFF00AA, "TEAM 1 Alert You dont have the Key ");
return 1;
}
}
if(CarCheck == team2[0] || CarCheck == team2[1] || CarCheck == team2[2] || CarCheck == team2[3] )
{
if(gTeam[playerid] != team2)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, 0xFFFF00AA, "TEAM 2 Alert You dont have the Key ");
return 1;
}
}
return 1;
}
return 1;
}