25.12.2018, 11:43
PHP код:
new giveplayerid, float:health;
if(sscanf(params, "uF", giveplayerid, health))
{
SetPlayerHealth(giveplayerid, health);
}
If we wanted to make it so that you HAD TO enter a health amount, the format would be "uf" for User and Float, however, because the amount is optional, it is "uF", capitalising the letter tells it that it's an optional check. (never made an optional float before, but I'm presuming it works the same as an integer :P)