SA-MP Forums Archive
[HELP] With /heal. - 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: [HELP] With /heal. (/showthread.php?tid=373762)



[HELP] With /heal. - anito - 31.08.2012

Hey. I have this command

pawn Код:
COMMAND:heal(playerid, params[])
{
    new Price, Float: PlayerHealth, string[64];
    GetPlayerHealth(playerid, PlayerHealth);
    Price = 100 - PlayerHealth;
    SetPlayerHealth(playerid, 100);
    GivePlayerMoney(playerid, -Price);
    format(string, sizeof(string), "You have been healed. You payed %d.", Price);
    SendClientMessage(playerid, GREEN, string);
    return 1;
}
But it shows this: warning 213: tag mismatch - Price = 100 - PlayerHealth;


Re: [HELP] With /heal. - Jack.7331 - 31.08.2012

Try making the price a float.


Re: [HELP] With /heal. - anito - 31.08.2012

Nope.


Re: [HELP] With /heal. - HuSs3n - 31.08.2012

pawn Код:
Price = floatround(100.0 - PlayerHealth);



Re: [HELP] With /heal. - anito - 31.08.2012

Works like a charm. Thank you.