19.10.2013, 09:33
Hello can anyone convert this command:
Into this kind of form of a cmd please?
Код:
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; }
Код:
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; }