09.03.2014, 08:03
This is an example how to do it.
pawn Code:
#define MAX_VIPCARS 10
new VIPCar[MAX_VIPCARS];
public OnGameModeInIt()
{
VIPCar[0] = AddStaticVehicleEx(451, 1.0, 2.0, 3.0, 4.0, 1, 1, 10);
VIPCar[1] = AddStaticVehicleEx(560, 2.0, 3.0, 4.0, 5.0, 1, 1, 10);
// and so on.
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
for(new i = 0; i < MAX_VIPCARS; i++)
{
if(vehicleid == VIPCar[i])
{
if(PlayerInfo[playerid][pDonator] == 0)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, -1, "You arent VIP");
}
}
}
return 1;
}