Client Message colour -
gtalover12 - 14.06.2009
Hi, well. Iv'e made an admin script with parts of other scripts and snippets ( Ladmin.. some commands ect, NOT FOR RELEASE. )
Well, here's the problem. the SendClientMessage is supposed to be ORANGE
pawn Код:
#define Orange 0x0080FFFF
pawn Код:
format(string,sizeof(string),"You have been wired by %s (reason: %s)",adminname,params[2]); SendClientMessage(player1,Orange,string);
Alright, why does this come out blue. and i don't even have this colour blue in any of my scripts
And don't bover saying " Is the code in the define maybe not orange, but blue? " Because iv'e checked, I'm using jelly-colour.
Also, i have another issue, Why does this crash my entire server?
pawn Код:
dcmd_ban(playerid,params[]) {
if(PlayerInfo[playerid][LoggedIn] == 1) {
if(PlayerInfo[playerid][Level] >= 4) {
new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(!strlen(params)) return SendClientMessage(playerid, white, "Usage: /ban <playerid> <reason>");
if(!strlen(tmp2)) return SendClientMessage(playerid, red, "ERROR: You must give a reason");
new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
player1 = strval(tmp);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid) {
GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname));
format(string,sizeof(string),"[Admin: %s] %s Has been Banned from the game (Reason: %s)",adminname,playername,params[2]);
SendClientMessageToAll(Orange,string);
SaveToFile("BanLog",string);
print(string);
if(udb_Exists(PlayerName2(player1)) && PlayerInfo[player1][LoggedIn] == 1) dUserSetINT(PlayerName2(player1)).("banned",1);
format(string,sizeof(string),"banned by Administrator %s (Reason: %s)", adminname, params[2] );
return BanEx(player1, string);
} else return SendClientMessage(playerid, red, "ERROR: Player is not connected or is yourself");
} else return SendClientMessage(playerid,red,"ERROR: You are not authorized to perform this operation");
} else return SendClientMessage(playerid,red,"ERROR: You are not logged in");
}
Thankyou in advance.
NoxY
Re: Client Message colour -
Correlli - 14.06.2009
http://www.colorhunter.com/tag/0080FF/1
You can see here..
Re: Client Message colour -
gtalover12 - 14.06.2009
the hex code in the define IS ORANGE. but it comes out blue, i've checked with LOTS of colour pickers.
Re: Client Message colour -
Correlli - 14.06.2009
0x0080FFFF -> #0080FF (search for this color code on ****** and you'll see it's blue).
Re: Client Message colour -
gtalover12 - 14.06.2009
Hmmm, i'll look into this, if so, the jelly-picker's orange is blue
Re: Client Message colour -
Burridge - 14.06.2009
pawn Код:
#define COLOR_ORANGE 0xFF830000
Re: Client Message colour -
Weirdosport - 14.06.2009
Well the colour you used was this, with an alpha of 255:
Pawn colours are in the form Red, Green, Blue, Alpha. I'm not sure if it's a mix up with this that's caused you to end up with blue or not.
P.S Hi Noxy >.>
Re: Client Message colour -
gtalover12 - 14.06.2009
S'up Thomas, Anyone have any ideas why the dcmd_ban causes a server crash ?
Re: Client Message colour -
Correlli - 14.06.2009
It's best if you add debug messages to see where the crash appears.
Re: Client Message colour -
Grim_ - 14.06.2009
Quote:
|
Originally Posted by Don Correlli
delete this.
|
The command is in the first post xD