06.07.2012, 14:32
Quote:
Afaik, no, because well again afaik, SAMP cannot tell what vehicle you're entering, but it can tell what vehicle you're in.
But who knows. |
Here, take a look at my piece of code.
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(CarInfo[vehicleid][CarLock] == 1)
{
ClearAnimations(playerid);
}
if(ispassenger == 0)
{
if(familyteam[vehicleid] != 0 && familyteam[vehicleid] != PlayerInfo[playerid][Family])
{
ClearAnimations(playerid);
}
else if(vteam[vehicleid] > 0 && vteam[vehicleid] != PlayerInfo[playerid][Fmember] && vteam[vehicleid] != 59 && vteam[vehicleid] != 2994 && vteam[vehicleid] != 2995)
{
ClearAnimations(playerid);
}
else if(vjob[vehicleid] > 0 && vjob[vehicleid] != PlayerInfo[playerid][pJob])
{
ClearAnimations(playerid);
}
}
return 1;
}