SA-MP Forums Archive
OnPlayerTeamPrivmsg error to disable =0 - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnPlayerTeamPrivmsg error to disable =0 (/showthread.php?tid=65084)



OnPlayerTeamPrivmsg error to disable =0 - Brazillian - 09.02.2009

I've been annoyed with dumb people using /tpm on servers from Brazil, than I looked for a solution, and I found this on wiki.sa-mp.com:
Код:
public OnPlayerTeamPrivmsg(playerid,text[]){return 0;}
But, when I've used it on a filterscript (clean script, it just has #include <a_samp> and this callback), I got this warning:
Код:
C:\DOCUME~1\PARTIC~1\Desktop\sa-mp\DESENV~1\FILTER~1\ANTI-T~1\TEAMPM~1.PWN(2) : warning 235: public function lacks forward declaration (symbol "OnPlayerTeamPrivmsg")
Some bug on this callback or am I doing something wrong?

I didn't even test if it works but if I got this kind of warning it shouldn't work.. ;P


Re: OnPlayerTeamPrivmsg error to disable =0 - yom - 09.02.2009

Someone forgot to put the forward into a_samp.

Your FS will look like this:
pawn Код:
forward OnPlayerTeamPrivmsg(playerid,text[]);

public OnPlayerTeamPrivmsg(playerid,text[])
  return 0;