10.11.2009, 16:18
Hey there,
I need help with this. I don't need the colour codes, but just how do I SET the text/player/team/command colour? Like this:
It's a /banip command, default is red (I don't know why), but I want this in an other colour, how do I do that? Thanks.
A.McKinley
I need help with this. I don't need the colour codes, but just how do I SET the text/player/team/command colour? Like this:
Код:
dcmd_banip(playerid, params[]) { new index = 0; tmp2 = strtok(params, index); if (pInfo[playerid][pAdmin] == 0) { SystemMessage(playerid, "You are not an Administrator."); return 1; } if(!strlen(tmp2)) { SystemMessage(playerid, "Correct usage: '/banip [playername] [reason]'"); return 1; } new string[MAX_STRING]; new second, minute, hour, day, month, year; giveplayerid = ReturnUser(tmp2); if (IsPlayerConnected(giveplayerid)) { format(string, sizeof(string), "You have been IP banned by Administrator %s. (Reason: '%s')", PlayerName(playerid), params); SendClientMessage(giveplayerid, COLOR_SYSTEM, string); format(string, sizeof(string), "Player %s has been IP banned by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params); SendClientMessageToAll(COLOR_SYSTEM, string); format(string, sizeof(string), "%s has been IP banned by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params); print(string); gettime(hour, minute, second); getdate(year, month, day); format(string,sizeof(string),"Player %s IP banned player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params); ServerLog(string); BanPlayer(giveplayerid, ""); } else { SendClientMessage(playerid, COLOR_SYSTEM, "That player is not active."); } return 1; }
A.McKinley