22.05.2011, 06:32
Tenta assim:
pawn Код:
forward IsAMedico(playerid);
forward IsAMedicoCar(carid);
public IsAMedico(playerid)
{
if(IsPlayerConnected(playerid))
{
new lider = (PlayerInfo[playerid][pLeader]);
new member = (PlayerInfo[playerid][pMember]);
if(member == 4 || lider == 4)
{
return 1;
}
}
return 0;
}
public IsAMedicoCar(carid)
{
if((carid == 90) || (carid == 91) || (carid == 92) || (carid == 93) || (carid == 94) || (carid == 106))
{
return 1;
}
return 0;
}
OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(IsAMedicoCar(newcar))
{
if(!IsAMedico(playerid) && !ispassenger)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "Voce nao e dos Medicos!");
}
}
return 0;
}