admin system error help me +1 rep
#1

i got this error


Код:
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
	if(GetConfig("LockPM")==1 || LockPrivm==1) return SendClientMessage(playerid,RED,"The PM is locked you can't PM to other players"),0;
	if(Info[playerid][Muted]==1 && GetConfig("MutePM")==1) return SendClientMessage(playerid,RED,"you are muted you can't say anything"),0;
	if(Ignore[recieverid][playerid]==1) return SendClientMessage(playerid,RED,"This player has ignored you, You CAN'T talk to him"),0;
	new string[128];
	format(string,sizeof(string),"PM from %s(%d): %s",Name(playerid),playerid,text);
	SendClientMessage(recieverid,PMCOLOR,string);
	format(string,sizeof(string),"PM send to %s: %s",Name(recieverid),text);
	SendClientMessage(playerid,PMCOLOR,string);
	if(GetConfig("ReadPM")==1)
	{
		format(string,sizeof(string),"PM: %s To: %s: %s",Name(playerid),Name(recieverid),text);
		for(new i=0; i<MAX_PLAYERS; i++)
		{
		    if(IsPlayerConnected(i) && IsPlayerHAdmin(i) && i != playerid && i != recieverid)
		    {
				SendClientMessage(i,GREEN,string);
			}
		}
	}
	return 1;
}

Код:
C:\DOCUME~1\BALOCH\MYDOCU~1\DOWNLO~1\SAMP03~1\FILTER~1\hadmin.pwn(911) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#2

Add this,
forward OnPlayerPrivmsg;
on the top of Public OnPlayerPrivmsg
Reply
#3

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

u mean like this
Reply
#4

pawn Код:
forward OnPlayerPrivmsg(playerid,recieverid,text[]);
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
    if(GetConfig("LockPM")==1 || LockPrivm==1) return SendClientMessage(playerid,RED,"The PM is locked you can't PM to other players"),0;
    if(Info[playerid][Muted]==1 && GetConfig("MutePM")==1) return SendClientMessage(playerid,RED,"you are muted you can't say anything"),0;
    if(Ignore[recieverid][playerid]==1) return SendClientMessage(playerid,RED,"This player has ignored you, You CAN'T talk to him"),0;
    new string[128];
    format(string,sizeof(string),"PM from %s(%d): %s",Name(playerid),playerid,text);
    SendClientMessage(recieverid,PMCOLOR,string);
    format(string,sizeof(string),"PM send to %s: %s",Name(recieverid),text);
    SendClientMessage(playerid,PMCOLOR,string);
    if(GetConfig("ReadPM")==1)
    {
        format(string,sizeof(string),"PM: %s To: %s: %s",Name(playerid),Name(recieverid),text);
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && IsPlayerHAdmin(i) && i != playerid && i != recieverid)
            {
                SendClientMessage(i,GREEN,string);
            }
        }
    }
    return 1;
}
Reply
#5

Add

pawn Код:
forward OnPlayerPrivmsg(playerid, recieverid, text[]);
Reply
#6

PHP код:
forward OnPlayerPrivmsg(playeridrecieveridtext[]); 
Reply
#7

5 people, same answer.
Reply
#8

thanx all rep
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)