float: health problem - help! :D
#1

Hey guys. Here's my problem. I want to give + 20 hp whenever taking a hit of LSD. But it just sets my hp to 20 instead.

My code:

pawn Код:
new Float:PlayersHealth;
                    new Float:PlayersArmour;

                    if (PlayerInfo[playerid][dLSD] < 1) return SCM(playerid, COLOR_LIGHTRED, "[Error]: You do not have any LSD.");

                    SetPlayerHealth(playerid, PlayersHealth + 20.0);
                    SetPlayerArmour(playerid, PlayersArmour + 30.0);
                   
                    PlayerActionMessage(playerid,15.0,"places a lsd hit on his tounge.");
                    SCM(playerid, -1, "** Uh.. watch out for dragons n' shit...");
Reply
#2

You forgot to use GetPlayerHealth and GetPlayerArmour first.
Reply
#3

Alright, I got it to work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)