16.06.2009, 18:18
hello, and sorry for my bad english, ...
i Want a script when if an Admin use a cmd, my script send a message just to admin, but i've bug .
what the bug please?
forward MessageToAdmins(color,const string[]);
public MessageToAdmins(color,const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1) if (PlayerInfo[i][Level] >= 1) SendClientMessage(i, color, string);
}
return 1;
}
and the error is
HELP ME PLEASE
i Want a script when if an Admin use a cmd, my script send a message just to admin, but i've bug .
what the bug please?
forward MessageToAdmins(color,const string[]);
public MessageToAdmins(color,const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1) if (PlayerInfo[i][Level] >= 1) SendClientMessage(i, color, string);
}
return 1;
}
Код:
stock CMDMessageToAdmins(playerid,command[]) { if(ServerInfo[AdminCmdMsg] == 0) return 1; new string[128]; GetPlayerName(playerid,string,sizeof(string)); format(string,sizeof(string),"[ADMIN] %s has used the command %s",string,command); return MessageToAdmins(blue,string); }
Quote:
C:\Program Files\Rockstar Games\GTA San Andreas\le ptiroman\gamemodes\LePtiRomand.pwn(16343) : warning 217: loose indentation C:\Program Files\Rockstar Games\GTA San Andreas\le ptiroman\gamemodes\LePtiRomand.pwn(16343) : error 029: invalid expression, assumed zero C:\Program Files\Rockstar Games\GTA San Andreas\le ptiroman\gamemodes\LePtiRomand.pwn(16343) : error 017: undefined symbol "MessageToAdmins" C:\Program Files\Rockstar Games\GTA San Andreas\le ptiroman\gamemodes\LePtiRomand.pwn(16343) : error 029: invalid expression, assumed zero C:\Program Files\Rockstar Games\GTA San Andreas\le ptiroman\gamemodes\LePtiRomand.pwn(16343) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |