22.02.2010, 14:54
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER)
{
if(IsACopCar(vehicleid))
{
if(GetPlayerTeam(playerid) == TEAM_POLICE)
{
}
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "You are not authorized to drive this vehicle");
RemovePlayerFromVehicle(playerid);
}
if(IsAmbulance(vehicleid))
{
if(GetPlayerTeam(playerid) == TEAM_MEDIC)
{
}
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "You are not authorized to drive this vehicle");
RemovePlayerFromVehicle(playerid);
}
}
return 1;
}
If im a cop and try get in ambulance, It dont let me in and kicks me out,
If i try get in cop car as a cop, It lets me,
If i spawn as medic and try get in ambulance, It dosent let me and kicks me out,
If i get in the cop car as a medic it lets me drive off??
Why is this