TogglePlayerControllable bug
#1

Hello
There is a bug with TogglePlayerControllable and vehicles.
If you break your car, when its HP is 250 or less, the car will start to burn.
If you then use TogglePlayerControllable, the car will stop burning.



EDIT

Код:
YCMD:setv(playerid,params[],help)
{
	new Float:hp = strval(params);
	SetVehicleHealth(GetPlayerVehicleID(playerid),hp);
	return 1;
}

public OnPlayerUpdate(playerid)
{
	new Float:VehHP;
	new string[128];
	GetVehicleHealth(GetPlayerVehicleID(playerid),VehHP);
	format(string,sizeof(string),"ID:%d - HP:%f",GetPlayerVehicleID(playerid),VehHP);
	SendClientMessage(playerid,COLOR_WHITE,string);
	return 1;
}
You can use this code to simulate the bug, just set the vehicle Hp to a lower value than 250.
You will see that the car instantly fixes to 300.0 HP.


EDIT2:
Even if you leave the car and then use TogglePlayerControllable, it will still repair to 300.0 HP.
I didn't test this with more players.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)