19.10.2013, 11:05
Can you also help me convert this command?
Код:
irccmd_setname(conn, channel[], user[], message[]) { new tmp[256], tmp2[256]; 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: /setname [ID] [NAME]"); if(IsPlayerConnected(strval(tmp)) == 0) return ircSay(conn, channel, "That player is not connected"); if(strlen(tmp2) == 0) return ircSay(conn, channel, "Use: /setname [ID] [NAME]"); new oname[MAX_PLAYER_NAME]; GetPlayerName(strval(tmp), oname, sizeof(oname)); new string[256]; format(string, sizeof(string), "\"%s\"'s score has had his name set to \"%s\" by IRC admin \"%s\"", oname, tmp2, user); SetPlayerName(strval(tmp), tmp2); SendClientMessageToAll(yellow, string); ircSay(conn, channel, string); return 1; }