BIGGEST problem - 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: BIGGEST problem (
/showthread.php?tid=553018)
------- -
nezo2001 - 27.12.2014
--------
Re: BIGGEST problem -
SickAttack - 27.12.2014
Use the following links as reference of your droughts:
https://github.com/Y-Less/sscanf/wiki
https://sampwiki.blast.hk/wiki/Fast_Commands
https://sampwiki.blast.hk/wiki/Format
https://sampforum.blast.hk/showthread.php?tid=120356
https://sampforum.blast.hk/showthread.php?tid=280476
https://sampforum.blast.hk/showthread.php?tid=206237
Re: BIGGEST problem -
nezo2001 - 27.12.2014
PHP код:
CMD:heal(playerid, params[])
{
new
id;
if (sscanf(params, "u", id)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/heal <playerid>\"");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else
{
SetPlayerHealth(id, 100.0);
SendClientMessage(id, 0x00FF00AA, "You have been healed");
SendClientMessage(playerid, 0x00FF00AA, "Player healed");
}
return 1;
}
Thing like that where is the code that make the player heal the other player with the id he typed ??
Re: BIGGEST problem -
SickAttack - 27.12.2014
Quote:
Originally Posted by nezo2001
PHP код:
CMD:heal(playerid, params[])
{
new
id;
if (sscanf(params, "u", id)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/heal <playerid>\"");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else
{
SetPlayerHealth(id, 100.0);
SendClientMessage(id, 0x00FF00AA, "You have been healed");
SendClientMessage(playerid, 0x00FF00AA, "Player healed");
}
return 1;
}
Thing like that where is the code that make the player heal the other player with the id he typed ??
|
"if(sscanf(params, "u", id)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/heal <playerid>\"");"
Entered player ID stored in the variable "id".
"SetPlayerHealth(id, 100.0);"
Set the player with the entered ID (stored in "id") to 100.
Re: BIGGEST problem -
nezo2001 - 27.12.2014
Thank you man