[HELP] please help heal command - 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] please help heal command (
/showthread.php?tid=518712)
[HELP] please help heal command -
Luca12 - 11.06.2014
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!");
}
}
Re: [HELP] please help heal command -
Koala818 - 11.06.2014
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.
Re: [HELP] please help heal command -
Luca12 - 11.06.2014
anyone? thanks
Re: [HELP] please help heal command -
RenovanZ - 11.06.2014
Have you make sure that your character isn't a Cop ?
Re: [HELP] please help heal command -
Luca12 - 11.06.2014
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
Re: [HELP] please help heal command -
EmadQmars - 11.06.2014
enter in admin level command
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;
}
|