12.04.2009, 07:49
How could I make system: People who got example LVPD Officer Skin, Can only enter police vehicles?
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if (newstate == PLAYER_STATE_PASSENGER || newstate == PLAYER_STATE_DRIVER)
{
new vehid = GetVehicleModel(GetPlayerVehicleID(playerid));
if(vehid == /*Put the police vehicle shit here*/)
{
if(GetPlayerSkin(playerid) == /*Put the skin number here*/)
{
RemovePlayerFromVehicle(playerid);
}
}
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(GetPlayerSkin(playerid) != 1 && GetVehicleModel(vehicleid) == 1) //Change id's. If the player isn't cop, he will be removed from vehicle RemovePlayerFromVehicle(playerid); } return 1; }