31.01.2012, 17:37
pawn Code:
if(newstate == PLAYER_STATE_DRIVER) // In OnPlayerStateChange, when he just entered the vehicle.
{
new skin = GetPlayerSkin(playerid);
switch(GetVehicleModel(GetPlayerVehicleID(playerid))
{
case 427, 596, 598, 597, 599: // Here the vehicle models
{
if(skin != 280) // Add more skins yourself
{
SendClientMessage(playerid, COLOR_RED, "You have to be a cop to enter this car!"); // Send a message he isn't a cop
RemovePlayerFromVehicle(playerid); // Remove him from the vehicle
}
}
}
}