SA-MP Forums Archive
Ladmin 4v2 errors - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Ladmin 4v2 errors (/showthread.php?tid=374375)



Ladmin 4v2 errors - xSkullx - 02.09.2012

Hi everybody, i have ladmin4v2 and i receive that error:
pawn Код:
ladmin4v2.pwn(1042) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
The Line:
pawn Код:
public OnPlayerPrivmsg(playerid, recieverid, text[])
The entire script:
pawn Код:
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
    if(ServerInfo[ReadPMs] == 1 && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
    {
        new string[128],recievername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, string, sizeof(string)); GetPlayerName(recieverid, recievername, sizeof(recievername));
        format(string, sizeof(string), "***PM: %s To %s: %s", string, recievername, text);
        for (new a = 0; a < MAX_PLAYERS; a++) if (IsPlayerConnected(a) && (PlayerInfo[a][Level] >= ServerInfo[MaxAdminLevel]) && a != playerid)
        SendClientMessage(a, grey, string);
    }
   
    if(PlayerInfo[playerid][Muted] == 1)
    {
        new string[128];
        PlayerInfo[playerid][MuteWarnings]++;
        if(PlayerInfo[playerid][MuteWarnings] < ServerInfo[MaxMuteWarnings]) {
            format(string, sizeof(string),"WARNING: You are muted, if you continue to speak you will be kicked (Warning: %d/%d)", PlayerInfo[playerid][MuteWarnings], ServerInfo[MaxMuteWarnings] );
            SendClientMessage(playerid,red,string);
        } else {
            SendClientMessage(playerid,red,"You have been warned! Now you have been kicked");
            GetPlayerName(playerid, string, sizeof(string));
            format(string, sizeof(string),"%s [ID %d] Kicked for exceeding mute warnings", string, playerid);
            SendClientMessageToAll(grey,string);
            SaveToFile("KickLog",string); Kick(playerid);
        } return 0;
    }
    return 1;
}



Re: Ladmin 4v2 errors - Balla - 02.09.2012

Let me give you a tip,

It's better to create your own Administration system.

Why?

Because you can put everything what you want in it, you will better know how to fix your errors. And you know 100% how your Administration system works!




Re: Ladmin 4v2 errors - C00K13M0N$73R - 02.09.2012

Forward it.


Re: Ladmin 4v2 errors - xSkullx - 02.09.2012

I know 100% how this administration system works.
I have almost everything what i want in it, because i modify it almost 80%.
Anyway, i fixed it.


AW: Ladmin 4v2 errors - Forbidden - 02.09.2012

The only thing you should do is to forward the public:
Quote:

forward OnPlayerPrivmsg(playerid, recieverid, text[]);

Copy that above from the
Quote:

OnPlayerPrivmsg

Callback