cmd convertion
#1

Hello can anyone convert this command:
Код:
irccmd_sethealth(conn, channel[], user[], message[])
{
        new tmp[256], tmp2[256], Float:health;
        tmp = zcmd(1, message);
        tmp2 = zcmd(2, message);
 
        if(ircIsOp(conn, channel, user) == 0) return ircSay(conn, channel, "You are not a channel admin");
        if(strlen(tmp) == 0) return ircSay(conn, channel, "Use: /sethealth [ID] [HEALTH]");
        if(IsPlayerConnected(strval(tmp)) == 0) return ircSay(conn, channel, "That player is not connected");
        if(strlen(tmp2) == 0) return ircSay(conn, channel, "Use: /sethealth [ID] [HEALTH]");
 
        health = strval(tmp2);
 
        SetPlayerHealth(strval(tmp), health);
 
        new oname[MAX_PLAYER_NAME];
        GetPlayerName(strval(tmp), oname, sizeof(oname));
 
        new string[256];
        format(string, sizeof(string), "\"%s\" has had his health set to \"%0.0f\" by IRC admin \"%s\"", oname, health, user);
 
        SendClientMessageToAll(yellow, string);
        ircSay(conn, channel, string);
        return 1;
}
Into this kind of form of a cmd please?
Код:
IRCCMD:kick(botid, channel[], user[], host[], params[])
{
    if (IRC_IsOp(botid, channel, user))
    {
        new playerid, reason[64];
        if (sscanf(params, "dS(No reason)[64]", playerid, reason))
        {
            return 1;
        }
        if (IsPlayerConnected(playerid))
        {
            new msg[128], name[MAX_PLAYER_NAME];
            GetPlayerName(playerid, name, sizeof(name));
            format(msg, sizeof(msg), "02*** %s has been kicked by %s on IRC. (%s)", name, user, reason);
            IRC_GroupSay(groupID, channel, msg);
            format(msg, sizeof(msg), "*** %s has been kicked by %s on IRC. (%s)", name, user, reason);
            SendClientMessageToAll(0x0000FFFF, msg);
            Kick(playerid);
        }
    }
    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)