SA-MP Forums Archive
admin system error help me +1 rep - 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: admin system error help me +1 rep (/showthread.php?tid=336664)



admin system error help me +1 rep - sscarface - 23.04.2012

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.



Re: admin system error help me +1 rep - Aira - 23.04.2012

Add this,
forward OnPlayerPrivmsg;
on the top of Public OnPlayerPrivmsg


Re: admin system error help me +1 rep - sscarface - 23.04.2012

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

u mean like this


Re: admin system error help me +1 rep - Roel - 23.04.2012

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;
}



Re: admin system error help me +1 rep - gabitzu4ever - 23.04.2012

Add

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



Re: admin system error help me +1 rep - Aloushi - 23.04.2012

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



Re: admin system error help me +1 rep - ]Rafaellos[ - 23.04.2012

5 people, same answer.


Re: admin system error help me +1 rep - sscarface - 23.04.2012

thanx all rep