18.10.2013, 13:09
i have make this code to got the player name and ip and its work fine but i want add a color to the name and ip how?
Код:
CMD:ip(playerid,params[]) { new targetid; if(!IsPlayerAdmin(playerid)) return SCM(playerid, RED, "UnKnown Command! Type /help"); if(sscanf(params,"u", targetid)) return SCM(playerid, RED, "Getting ip of a player: /ip <playerid>"); if(!IsPlayerConnected(targetid)) return SCM(playerid, RED, "Player is not connected"); new ip[25], ip_msg[100], ip_name[MAX_PLAYER_NAME], str[24]; GetPlayerName(playerid, ip_name,sizeof (ip_name)); GetPlayerIp(playerid, ip,sizeof (ip)); format(ip_msg,sizeof (ip_msg),"(%s)",ip); format(str,sizeof (str),"%s", ip_name); ShowPlayerDialog(playerid, DIALOG_MSG, DIALOG_STYLE_MSGBOX, ip_name, ip_msg, "Close", ""); return 1; }