28.06.2012, 22:19
pawn Код:
public AdminChat(color2, playerid, const string[])
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1)
if(PlayerInfo[playerid][Adminlevel] > 1)
SendClientMessage(i, color2, string);
}
return 1;
}
public OnPlayerText(playerid, text[])
{
new pname[MAX_PLAYER_NAME], str[128];
GetPlayerName(playerid, pname, sizeof(pname));
strreplace(pname, '_', ' ');
format(str, sizeof(str), "%s says: %s", pname, text);
ProxDetector(30.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
if(text[0] == '.' && PlayerInfo[playerid][Adminlevel] >= 1)
{
new string[128]; GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"AdminChat: %s: %s",string,text[1]);
AdminChat(string);
}
return 1;
}
pawn Код:
(1667) : error 035: argument type mismatch (argument 1)
pawn Код:
AdminChat(green,string);