16.12.2015, 09:30
So I have in public fuelcheck when fuel of some vehicle reach 0 then it send to player there's no fuel left in vehicle press button Y to exit and of course it freeze player and I set NoFuel{i} = 1;
then in onplayerkeystatechange I have
then in onplayerkeystatechange I have
pawn Код:
if(newkeys & KEY_YES)
{
if(NoFuel{playerid} == 1)
{
TogglePlayerControllable(playerid,1);//it should unfreeze player when he is pressed button y but the player is removed from vehicle and still remain frozen and if I again for second time press Y then the player is unfreezed.
RemovePlayerFromVehicle(playerid);
NoFuel{playerid} = 0;
}
}