protect my PM - 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: protect my PM (
/showthread.php?tid=70439)
protect my PM -
WhiteHouse - 24.03.2009
If somebody knows how to make a protection for Pm Flooding/Spamming please write it here
Re: protect my PM -
MenaceX^ - 24.03.2009
Make an anti spam?
Re: protect my PM -
Pyrokid - 24.03.2009
You could script a command that disallows PM-ing.
Like:
At to of your script
pawn Code:
if (strcmp("/nopms", cmdtext, true) == 0)
{
if(nopm[playerid] == 0)
{
nopm[playerid] = 1;
SendClientMessage(playerid, YOUR_COLOR, "You turned off private messages");
} else if(nopm[playerid] == 1) {
nopm[playerid] = 0;
SendClientMessage(playerid, YOUR_COLOR, "You turned on private messages");
}
return 1;
}
Then do this in OnPlayerPrivmsg
pawn Code:
if(nopm[recieverid] == 1) {
SendClientMessage(playerid, YOUR_COLOR, "This player doesn't want to be PM'd");
return 0;
}
Re: protect my PM -
WhiteHouse - 24.03.2009
Quote:
|
Originally Posted by Pyrokid
You could script a command that disallows PM-ing.
Like:
At to of your script
pawn Code:
if (strcmp("/nopms", cmdtext, true) == 0) { if(nopm[playerid] == 0) { nopm[playerid] = 1; SendClientMessage(playerid, YOUR_COLOR, "You turned off private messages"); } else if(nopm[playerid] == 1) { nopm[playerid] = 0; SendClientMessage(playerid, YOUR_COLOR, "You turned on private messages"); } return 1; }
Then do this in OnPlayerPrivmsg
pawn Code:
if(nopm[receiverid] == 1) { SendClientMessage(playerid, YOUR_COLOR, "This player doesn't want to be PM'd"); return 0; }
|
|
I know this one...I need anti PM spam! example /pm 1 hello //when you wanna spam than it comes up " Do not reapit your self!" so I need anti PM spam
Re: protect my PM -
MenaceX^ - 24.03.2009
Set a timer that if the player writes more than %d letters per a %d seconds he gets this message.
Re: protect my PM -
WhiteHouse - 24.03.2009
Quote:
|
Originally Posted by MenaceX^
Set a timer that if the player writes more than %d letters per a %d seconds he gets this message.
|
yeah..I tryed but ... not working...my pwn closes when compiling..can somebody write it?
Re: protect my PM -
MenaceX^ - 24.03.2009
Yes because you had less/too many brackets.
Show your code.
Re: protect my PM -
WhiteHouse - 24.03.2009
Quote:
|
Originally Posted by MenaceX^
Yes because you had less/too many brackets.
Show your code.
|
well now ... No errors..looks like working..BTW; I tryed and nothing
here
i made a static lastmsg with max player 128
and under public OnPlayerPrivmsg(playerid, recieverid, text[])
made if(strfind(lastmsg[playerid], text, false) != -1)
{
SendClientMessage(playerid, 0xFF0000FF, "Do not reapit your self!");
it's probably with no errors
...but it's not working in the game i can spam. .:S
Re: protect my PM -
Mikep - 24.03.2009
If your looking for a PM antispam, i'm about to release one.
Re: protect my PM -
WhiteHouse - 24.03.2009
Quote:
|
Originally Posted by Mikep
If your looking for a PM antispam, i'm about to release one.
|
ok..write the code here..i can't wait dont have much time .. thx