Object won't work
#1

Hi everyone. I've encountered an issue with this script:
pawn Код:
GetPlayerHealth(playerid, pHealth);
    GetPlayerArmour(playerid, pArmour);
    if(Giocatore[playerid][Health] > floatround(pHealth))
    {
        Giocatore[playerid][Health] = floatround(pHealth);
        new cuore;
        cuore = CreateObject(1240, 0, 0, 0, 0, 0, 0);
        AttachObjectToPlayer(cuore, playerid, 0, 0, 1.35, 0, 0, 0);
        SetTimerEx("HealthArmour", 500, false, "i", cuore);
    }
    if(Giocatore[playerid][Armour] > floatround(pArmour))
    {
        Giocatore[playerid][Armour] = floatround(pArmour);
        new giubbotto;
        giubbotto = CreateObject(1242, 0, 0, 0, 0, 0, 0);
        AttachObjectToPlayer(giubbotto, playerid, 0, 0, 1.50, 0, 0,0);
        SetTimerEx("HealthArmour", 500, false, "i", giubbotto);
    }
The health or armour won't appear (only some times they will).
But if I change the ">" in "!=" I won't have this problem.
By the way, the object will display even when a player gets healed and I don't want that to happen. How can I solve this problem? Thanks
Reply
#2

Bump!
Reply
#3

0, 0, 0, 0, 0, 0

This is the thing.. you need to randomize.. You set the cords under ground in nowhere...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)