[HELP] please help heal command
#1

So I have heal command and I have upgrader armour to the house and when I was in the house it says no availbe upgrades

here is the code


pawn Код:
if(h != -1)
        {
            if(IsPlayerInRangeOfPoint(playerid,20.0,HouseInfo[h][hexitX],HouseInfo[h][hexitY],HouseInfo[h][hexitZ]))
            {
                        if(HouseInfo[h][hHel] == 1)
                        {
                                new Float:tempheal;
                                GetPlayerHealth(playerid,tempheal);
                                if(tempheal < 99.0)
                                {
                                        SetPlayerHealth(playerid,99.0);
                                        format(string,sizeof(string),"*You are healed.");
                                        SendClientMessage(playerid,COLOR_BIJELA,string);
                                }
                                else SendClientMessage(playerid,COLOR_GRAD2,"{F81414}[Greska!] {C3C3C3}You are already healed!");
                                return 1;
                        }
                        if(HouseInfo[h][hArm] == 1 && !IsACop(playerid))
                        {
                                new Float:armour;
                                GetPlayerArmour(playerid,armour);
                                if(armour < 99.0)
                                {
                                        SetPlayerArmour(playerid,99.0);
                                        format(string,sizeof(string),"*You get armour.");
                                        SendClientMessage(playerid,COLOR_BIJELA,string);
                                }
                                else SendClientMessage(playerid,COLOR_GRAD2,"{F81414}[Greska!] {C3C3C3}You already have armour!");
                                return 1;
                        }
                        else return SCM(playerid,COLOR_GRAD2,"{F81414}[Greska!] {C3C3C3}No availble upgrades!");
                }
        }
Reply
#2

It says "No available updates" only if the HouseInfo[h][hArm]!=1 or if IsACop(playerid) returns 0. Check both of them and see what's wrong. Also you can format and sendclientmessage with HouseInfo[h][hArm] and IsACop(playerid) to see exactly.
Reply
#3

anyone? thanks
Reply
#4

Have you make sure that your character isn't a Cop ?
Reply
#5

that was mistake I remove that still is problem also for if(HouseInfo[h][hHel] == 1) I have buy house and I was type command heal and it says that I'm healed but I didn't upgrade house for this I mean for health? thanks
Reply
#6

enter in admin level command
Quote:

dcmd(adheal,6,cmdtext);

and cod

pwncod:
Quote:

dcmd_adheal(playerid,params[])
{
new string[128];
new ID;
if(sscanf(params,"us[100]",ID))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /adheal (Player Name/ID)");
return 1;
}
if(!IsPlayerConnected(ID))
{
format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot heal them.",ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)