16.03.2010, 05:33
I have a filterscript where I have a specific car,
I have another FS where I want to check if people are getting into that car, because I want to limit the people that get in to two
Does this look right for what I want, and how do I get the vehicle id of "scar" from the first FS in the second?
Код:
scar = AddStaticVehicle(xxx,0,0,0,0,0,180);
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if (ispassenger)
{
if (GetVehicleModel(vehicleid) == xxx)
{
if (vehicleid == scar && NinAS > 1)
{
SendClientMessage(playerid, COLOR_RED, "There are no open seats!");
}
else
{
//some irrelevant coding here...
if (vehicleid == scar)
{
NinAS += 1;
}
}
}
}else
{
if (vehicleid == scar)
{
NinAS += 1;
}
}
return 1;
}
Thanks a million,
Tony
Tony


