SA-MP Forums Archive
Anti Spam Help - 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: Anti Spam Help (/showthread.php?tid=93444)



Anti Spam Help - landapanda - 25.08.2009

The errors i get from below script are;
Quote:

C:\Users\Greg\Desktop\pawno\gregs.pwn(17 : error 017: undefined symbol "pInfo"
C:\Users\Greg\Desktop\pawno\gregs.pwn(17 : warning 215: expression has no effect
C:\Users\Greg\Desktop\pawno\gregs.pwn(17 : error 001: expected token: ";", but found "]"
C:\Users\Greg\Desktop\pawno\gregs.pwn(17 : error 029: invalid expression, assumed zero
C:\Users\Greg\Desktop\pawno\gregs.pwn(17 : fatal error 107: too many error messages on one line

4 Errors.

Line 178:
Quote:

if(pInfo[playerid][Spamer] == 1) {

Please me out guys & gals

Top of script
Код:
//==========ANTI SPAM===============//
new PlayerWritedMessages[MAX_PLAYERS];
forward AntiSpamTimer(playerid);
new SpamTimer[MAX_PLAYERS];
forward RemoveSpam();
#define ALLOW_MESSAGES 5
//=================================//
OnGameModeInit:
Код:
SetTimer("RemoveSpam", 4000, true);
OnPlayerText:
Код:
if(pInfo[playerid][Spamer] == 1) {
SendClientMessage(playerid,white,"You need to wait, because you are flooder!");
return false; }
PlayerWritedMessages[playerid] += 1;
if(PlayerWritedMessages[playerid] >= ALLOW_MESSAGES) {
pInfo[playerid][Spamer] = 1;
PlayerWritedMessages[playerid] = 0;
SpamTimer[playerid] = SetTimerEx("AntiSpamTimer",10000,false,"d",playerid);
}
Код:
public AntiSpamTimer(playerid) {
PlayerWritedMessages[playerid] = 0;
KillTimer(SpamTimer[playerid]);
pInfo[playerid][Spamer] = 0;	
return 1;
}

public RemoveSpam() {
for(new z = INVALID_PLAYER_ID; z < MAX_PLAYERS; z++) {
if(pInfo[z][Spamer] != 1) {
KillTimer(SpamTimer[z]);
PlayerWritedMessages[z] = 0; } }
return 1;
}

public RemoveSpam() {
for(new z = 0; z < MAX_PLAYERS; z++) {
if(pInfo[z][Spamer] != 1) {
KillTimer(SpamTimer[z]);
PlayerWritedMessages[z] = 0; } }
return 1;
}




Re: Anti Spam Help - Lewwy - 25.08.2009

Try change pInfo to PlayerInfo on that line.


Re: Anti Spam Help - landapanda - 25.08.2009

Nope that didnt work. Thanks for trying.


Re: Anti Spam Help - SpiderPork - 25.08.2009

Uh, have you got something like this:

pawn Код:
enum lulz
{
   lulz1,
   lulz2,
   lulz3,
   lulz4, blah, blah
}
new pInfo[MAX_PLAYERS][lulz];



Re: Anti Spam Help - landapanda - 26.08.2009

I'm kinda new to this so can you help me out a bit more then just 'lulz'


Re: Anti Spam Help - cozza123456 - 26.08.2009

Try searching for tutorials im sure there is some out there?