19.10.2013, 10:59
pawn Код:
IRCCMD:sethealth(botid, channel[], user[], host[], params[])
{
if (!IRC_IsOp(botid, channel, user)) return IRC_Say(botid, channel, "Unknow command !");
new target, health;
if(sscanf(params, "ud", target, health))
{
IRC_Say(botid, channel, "USAGE: /sethealth [player] [health]");
return 1;
}
if (IsPlayerConnected(target))
{
new msg[256], oname[MAX_PLAYER_NAME];
GetPlayerName(target, oname, sizeof(oname));
format(msg, sizeof(msg), "*** %s has had his health set to %d by IRC admin %s", oname, health, user);
SendClientMessageToAll(yellow, msg);
SetPlayerHealth(target, health);
}
else
{
IRC_Say(botid, channel, "That person does not connect");
}
return 1;
}