Kód elejére:
enum PizzaCars
{
pizza1,
pizza2,
pizza3,
pizza4,
pizza5,
pizza6,
pizza7,
pizza8,
};
new Cars[PizzaCars];
OnGameModeInit függvényhez:
Cars[pizza1] = CreateVehicle(..);
Cars[pizza2] = CreateVehicle(..);
//stb.
OnPlayerStateChange függvényhez:
if(newstate == PLAYER_STATE_DRIVER)
{
new CarCheck = GetPlayerVehicleID(playerid);
if(CarCheck == Cars[pizza1] || CarCheck == Cars[pizza2] || CarCheck == Cars[pizza3] || CarCheck == Cars[pizza4] || CarCheck == Cars[pizza5] || CarCheck == Cars[pizza6] || CarCheck == Cars[pizza7] || CarCheck == Cars[pizza8])
{
if(gTeam[playerid] == team_pizzas) //gTeam vagy amit használsz
{
//ha pizzás mi történjen
}
else
{
//ha nem pizzás mi történjen
}
}
}
A sorok valószínûleg el vannak csúszva.