a question - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: a question (
/showthread.php?tid=135804)
a question -
aircombat - 21.03.2010
k i made a command /heal but i wanted to make if the player which should be healed has 100 health the healer gets an error but it doesnt work , if player like has 13 hp it says the error , so anyone know why??
Код:
new Float:Health;
GetPlayerHealth(id,Health);
if(Health >= 100) return SendClientMessage(playerid, COLOR_RED, "Server: That player does not need to be healed by a medic.");
Re: a question -
bajskorv123 - 21.03.2010
Show whole command
Re: a question -
aircombat - 21.03.2010
why u even want it , its sscanf
Код:
if(gTeam[playerid] != TEAM_MEDIC) return SendClientMessage(playerid, COLOR_RED, "You're not a Medic!");
if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "Correct Usage: /heal [playerid]");
else if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "Server: Player ID not found, please check it and try again.");
// else if(Health >= 100) return SendClientMessage(playerid, COLOR_RED, "Server: That player does not need to be healed by a medic.");
else if(!IsPlayerInRangeOfPoint(playerid, 5.0, gX, gY, gZ)) return SendClientMessage(playerid, COLOR_RED, "Server: You must be within 5 ft. of the person to heal them.");
else if(healedrec[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "Server: You can only heal a player ever 15 seconds, please wait.");
else
{
Re: a question -
aircombat - 21.03.2010
SO what is the problem?
Re: a question -
Killa_ - 21.03.2010
You tried
if(Health >= 100.0) ?
Idk if it makes any difference