SA-MP Forums Archive
[Ajuda] Admin Chat - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Admin Chat (/showthread.php?tid=325138)



[Ajuda] Admin Chat - Lucas, - 12.03.2012

PHP код:
public OnPlayerText(playeridtext[])
{
    if(
text[0] == '@' && (PlayerInfo[playerid][pAdminLevel] <2)
    {
    
GetPlayerName(playerid,NomeP,MAX_PLAYER_NAME);
    
format(Stringsizeof(String),"[Admin Chat]: %s: %s",NomeP,text[1]);
    
SendAdminMsg(COLOR_YELLOW,String);
    return 
0;
    }
    return 
1;

Код:
C:\Documents and Settings\Lucas8\Desktop\DM-4FUN\filterscripts\bAdmin.pwn(99) : error 017: undefined symbol "NomeP"
C:\Documents and Settings\Lucas8\Desktop\DM-4FUN\filterscripts\bAdmin.pwn(99) : error 001: expected token: "}", but found ";"
C:\Documents and Settings\Lucas8\Desktop\DM-4FUN\filterscripts\bAdmin.pwn(99) : error 036: empty statement
C:\Documents and Settings\Lucas8\Desktop\DM-4FUN\filterscripts\bAdmin.pwn(99) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: [Ajuda] Admin Chat - ViniBorn - 12.03.2012

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(text[0] == '@' && PlayerInfo[playerid][pAdminLevel] > 0)
    {
        new NomeP[MAX_PLAYER_NAME];
        GetPlayerName(playerid,NomeP,MAX_PLAYER_NAME);
        format(String, sizeof(String),"[Admin Chat]: %s: %s",NomeP,text[1]);
        SendAdminMsg(COLOR_YELLOW,String);
        return 0;
    }
    return 1;
}



Re: [Ajuda] Admin Chat - Lucas, - 12.03.2012

C:\Documents and Settings\Lucas8\Desktop\DM-4FUN\filterscripts\pAdmin.pwn(102) : error 017: undefined symbol "SendAdminMsg"


Re: [Ajuda] Admin Chat - Jason` - 12.03.2012

pawn Код:
stock SendAdminMsg(cor, texto[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && PlayerInfo[i][pAdminLevel] > 0)
        {
            SendClientMessage(i, cor, texto);
        }
    }
    return 1;
}



Re: [Ajuda] Admin Chat - Lucas, - 12.03.2012

Onde ponho isso ?


Re: [Ajuda] Admin Chat - Jason` - 12.03.2012

fim do gm/fs