#1

Solved
Reply
#2

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!
Reply
#3

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
Reply
#4

Solved
Reply
#5

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;
}

Reply
#6

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

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,
Reply
#8

Solved
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)