cmd convertion
#3

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


Messages In This Thread
cmd convertion - by Tomix - 19.10.2013, 09:33
Re: cmd convertion - by Voxel - 19.10.2013, 10:36
Re: cmd convertion - by rickisme - 19.10.2013, 10:59
Re: cmd convertion - by Tomix - 19.10.2013, 11:05
Re: cmd convertion - by Tomix - 19.10.2013, 12:43
Re: cmd convertion - by rickisme - 19.10.2013, 14:20

Forum Jump:


Users browsing this thread: 1 Guest(s)