SendClientMessage(playerid, WHITE, "You have entered a car!");
This forum requires that you wait 120 seconds between posts. Please try again in 34 seconds. |
You have to define every car ID then like 400, 597, etc. I don't know how though, sorry. I'm more of a mapper than a scripter...
|
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == bikeid || vehicleid == bikeid || vehicleid == bikeid /*keep going untill ur dont */ )
{
SendClientMessage(playerid,COLOR,"You enter a bike");
}
return 1;
}
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;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(!IsBike(playerid,vehicleid))
{
SendClientMessage(playerid,WHITE,"You have entered a car");
}
return 1;
}
public IsABike(carid)
{
if(carid == 509||carid == 481||carid == 510||carid == 462||carid == 448||carid == 581||carid == 522||carid == 461||carid == 521||carid == 523||carid == 463||carid == 586||carid == 468||carid == 471)
{
return 1;
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(!IsABike(playerid,vehicleid))
{
SendClientMessage(playerid,WHITE,"You have entered a car");
}
return 1;
}