[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]: /heal command (
/showthread.php?tid=428536)
[HELP]: /heal command -
Areax - 06.04.2013
Hi!
How can I make an admin command /heal [id] [How much health]
Sorry for my bad English...
Re: [HELP]: /heal command -
Giroud12 - 06.04.2013
https://sampwiki.blast.hk/wiki/Fast_Commands
Re: [HELP]: /heal command -
Face9000 - 06.04.2013
Made in 20 seconds and not tested, this is a basic /heal command:
pawn Код:
CMD:heal(playerid, params[])
{
new hp;
new destid;
if(sscanf(params,"ud",destid,hp)) return SCM(playerid, -1,"Usage: /heal <playerid> <ammount>");
SetPlayerHealth(destid,hp);
SendClientMessage(playerid, pink, "Player healed");
return 1;
}
Re: [HELP]: /heal command -
]Rafaellos[ - 06.04.2013
pawn Код:
CMD:heal(playerid, params[])
{
new pID, health;
if(sscanf(params, "ud", pID, health)) return SendClientMessage(playerid, -1, "/heal id health");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, -1, "Player not connected.");
SetPlayerHealth(pID, health);
return 1;
}
Re: [HELP]: /heal command -
Skyrise - 06.04.2013
Quote:
Originally Posted by ]Rafaellos[
pawn Код:
CMD:heal(playerid, params[]) { new pID health; if(sscanf(params, "ud", pID, health)) return SendClientMessage(playerid, -1, "/heal id health"); if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, -1, "Player not connected."); SetPlayerHealth(pID, health); return 1; }
|
That won't work. You forgot a comma.
Re: [HELP]: /heal command -
]Rafaellos[ - 06.04.2013
Edited, thanks Skyrise.
Re: [HELP]: /heal command -
Areax - 06.04.2013
Thanks guys, It's working.