27.11.2010, 01:48
You could use this function I found here at the forums ![Tongue](images/smilies/razz.gif)
Then you could use it like:
![Tongue](images/smilies/razz.gif)
pawn Код:
IsBike(playerid,vehicleid) // Credits to the creator!
{
#define MAX_BIKEZ 13
new IsBikeA[MAX_BIKEZ] =
{
581,523,462,521,463,522,461,448,468,586
};
vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInVehicle(playerid,vehicleid))
{
for(new i = 0; i < MAX_BIKEZ; i++)
{
if(GetVehicleModel(vehicleid) == IsBikeA[i])
{
return true;
}
}
}
return false;
}
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(!IsBike(playerid,vehicleid))
{
SendClientMessage(playerid,WHITE,"You have entered a car");
}
return 1;
}