SA-MP Forums Archive
heal? - 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: heal? (/showthread.php?tid=183803)



heal? - Kitten - 16.10.2010

Solved


Re: heal? - SkizzoTrick - 16.10.2010

if(strcmp,("/heal"...
setting the giveplayerid //this sets the requested id,but i can't write it now
{
SetPlayerHp(giveplayerid, 100);//sets his life
}
return 1;

try to copy it from other GM!


heal? - [NoV]LaZ - 16.10.2010

Quote:
Originally Posted by SkizzoTrick
Посмотреть сообщение
if(strcmp,("/heal"...
setting the giveplayerid //this sets the requested id,but i can't write it now
{
SetPlayerHp(giveplayerid, 100);//sets his life
}
return 1;

try to copy it from other GM!
Why did you even bothered posting ?

@ Kitten: Check the examples here: https://sampwiki.blast.hk/wiki/Dcmd


Re: heal? - Kitten - 16.10.2010

Solved


Re: heal? - SkizzoTrick - 16.10.2010

Try this!
Quote:

new index;
cmd = strtok(cmdtext, index);
if (strcmp(cmd, "/heal", true) == 0)
{
new id;
tmp = strtok(cmdtext, index);
if (strlen(tmp))
{
id = strval(tmp);
if (IsPlayerConnected(id))
{
SetPlayerHealth(id, 99.0);
SendClientMessage(id, 0x00FF00AA, "You've been healed by a medic!");
SendClientMessage(playerid, 0x00FF00AA, "Player healed.");
SendClientMessage(playerid, GCOLOR_GREEN, "You may heal again in 15 seconds.");
healedrec[playerid] = 1;
SetTimerEx("HealAgain", 15000, 0, "i", playerid);
}
}
return 1;
}




Re: heal? - Austin - 16.10.2010

Quote:
Originally Posted by SkizzoTrick
Посмотреть сообщение
Try this!
That is HORRIBLE!!! Where is the indenting?!


Re: heal? - SkizzoTrick - 16.10.2010

Quote:
Originally Posted by [NoV]LaZ
Посмотреть сообщение
Why did you even bothered posting ?

@ Kitten: Check the examples here: https://sampwiki.blast.hk/wiki/Dcmd
i was making the command,


Re: heal? - Kitten - 16.10.2010

Solved