Posts: 414
Threads: 93
Joined: Dec 2010
Quote:
Originally Posted by xX_Simon_Xx
Try to put this
PHP Code:
if(IsVehicleCopCar(vehicleid) && pTeam[forplayerid] != TEAM_COP) // Or whatever team system you are using
{
SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1); // Lock doors
}
under OnPlayerEnterVehicle
or try this code
PHP Code:
if(IsVehicleCopCar(vehicleid) && pTeam[forplayerid] != TEAM_COP) // Or whatever team system you are using
{
new motore,luci,allarme,sicura,cofano,bagagliaio,objective;
GetVehicleParamsEx(vehicleid,motore,luci,allarme,sicura,cofano,bagagliaio,objective);
SetVehicleParamsEx(vehicleid,motore,luci,allarme,VEHICLE_PARAMS_ON,cofano,bagagliaio,objective);
}
|
im using it as a factiontype thing like this
PHP Code:
if(IsVehicleCopCar(vehicleid) && cop < 1) // Or whatever team system you are using
{
SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1); // Lock doors
}
if(IsVehicleCopCar(vehicleid) && cop >= 1) // Or whatever team system you are using
{
SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 0); // Lock doors
}
It locks the car for the cops as well so even a cop can't drive it but ill try what you said. under on player enter vehicle.