SA-MP Forums Archive
SetVehicleParamsExForPlayer? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SetVehicleParamsExForPlayer? (/showthread.php?tid=333989)



SetVehicleParamsExForPlayer? - HondaCBR - 13.04.2012

is there a way to set vehicle params for player, but not SetVehicleParamsForPlayer, because I want to set the engine to off if you enter someones car, but that person can still hear the engine running as the params will only turn if off for the guy who entered.


Re: SetVehicleParamsExForPlayer? - HondaCBR - 13.04.2012

Ah right. Have you got any ideas how when someone enters a vehicle that doesnt belong to him, it allows him to stay but not to drive. I dont want to use TogglePlayerControllAble as it freezes your camera aswell.

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
if(IsPlayerInVehicle(playerid,Car[playerid][VehicleGameID]) == 1)
{
return 1;
}
else
{
//what can we use isnted of TogglePlayerControllAble?
}
}
return 1;
}