14.06.2009, 10:42
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
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?
Thankyou in advance.
NoxY
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);
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");
}
NoxY