04.10.2011, 12:14
PHP код:
IsPlayerInVehicle(playerid, vehicleid) == ...
PHP код:
//top of script
new Helmet[MAX_PLAYERS];
public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{
if (GetVehicleModel(vehicleid) == 522 || GetVehicleModel(vehicleid) == 509
|| GetVehicleModel(vehicleid) == 481
|| GetVehicleModel(vehicleid) == 510
|| GetVehicleModel(vehicleid) == 462
|| GetVehicleModel(vehicleid) == 448
|| GetVehicleModel(vehicleid) == 581
|| GetVehicleModel(vehicleid) == 461
|| GetVehicleModel(vehicleid) == 521
|| GetVehicleModel(vehicleid) == 523
|| GetVehicleModel(vehicleid) == 463
|| GetVehicleModel(vehicleid) == 586
|| GetVehicleModel(vehicleid) == 468
|| GetVehicleModel(vehicleid) == 471)
{
Helmet[playerid] = CreateObject(18645,0.0,0.0,0.0,0.0,0.0,0.0,30.0);
AttachObjectToPlayer(Helmet[playerid], playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ);
}
return 1;
}
public OnPlayerExitVehicle(playerid,vehicleid)
{
DestroyObject(Helmet[playerid]);
return 1;
}