09.11.2012, 17:41
Hi, I have just downloaded your file and taken a very quick look at the script. And maybe it's because I'm a newbie at scripting, but I don't know why in each command you put a line with IsPlayerAdmin(playerid); without an if conditional in front of it:
pawn Код:
CMD:box(playerid,params[]) {
#pragma unused params
IsPlayerAdmin(playerid);
if(isnull(params)) return SendClientMessage(playerid,0xBD34DAFF,"Current Usage: /boxchat [text]");
SendClientMessage(playerid,0x20B2AAFF,"Message Sended!");
new string[128],name[24];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"Admin %s[ID:%i]: %s",name,playerid,params);
SendXMessage(playerid,string);
return 1;
}
CMD:abox(playerid,params[]) {
#pragma unused params
IsPlayerAdmin(playerid);
if(isnull(params)) return SendClientMessage(playerid,0xBD34DAFF,"Current Usage: /boxchat [text]");
SendClientMessage(playerid,0x20B2AAFF,"Message Sended!");
new string[128],name[24];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"%s",params);
SendXMessage(playerid,string);
return 1;
}
CMD:clearbox(playerid,params[]) {
#pragma unused params
IsPlayerAdmin(playerid);
SendXMessage(playerid," ");
SendXMessage(playerid," ");
SendXMessage(playerid," ");
SendXMessage(playerid," ");
SendXMessage(playerid," ");
SendXMessage(playerid," ");
SendXMessage(playerid," ");
SendXMessage(playerid," ");
SendXMessage(playerid," ");
return 1;
}