19.01.2011, 08:13
This will work if you set their skin before the vehicles streams in (when they login, or far away from the ambulances, or in an interior). If you do not, the ambulance will remain locked even with the skin.
However, you can unlock the vehicle with
whenever you set the skin, and If you're close to the vehicles It will still unlock.
But you must have the code under OnVehicleStreamIn.
However, you can unlock the vehicle with
pawn Код:
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
But you must have the code under OnVehicleStreamIn.
pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
new skin = GetPlayerSkin(playerid);
new model = GetVehicleModel(vehicleid);
if(model==416)
{
if(skin==275 || skin==276)
{
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
}
else
{
SetVehicleParamsForPlayer(vehicleid,playerid,0,1);
}
}
return 1;
}