SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 24/03/2009, 09:30 PM   #1
WhiteHouse
Little Clucker
 
Join Date: Mar 2009
Posts: 7
Reputation: 0
Default protect my PM

If somebody knows how to make a protection for Pm Flooding/Spamming please write it here
WhiteHouse is offline  
Old 24/03/2009, 09:31 PM   #2
MenaceX^
High-roller
 
Join Date: Aug 2008
Posts: 3,768
Reputation: 13
Default Re: protect my PM

Make an anti spam?
MenaceX^ is offline  
Old 24/03/2009, 09:34 PM   #3
Pyrokid
Gangsta
 
Join Date: May 2006
Posts: 501
Reputation: 0
Default Re: protect my PM

You could script a command that disallows PM-ing.

Like:
At to of your script
pawn Code:
new nopm[MAX_PLAYERS];

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;
    }
Pyrokid is offline  
Old 24/03/2009, 09:41 PM   #4
WhiteHouse
Little Clucker
 
Join Date: Mar 2009
Posts: 7
Reputation: 0
Default Re: protect my PM

Quote:
Originally Posted by Pyrokid
You could script a command that disallows PM-ing.

Like:
At to of your script
pawn Code:
new nopm[MAX_PLAYERS];

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
WhiteHouse is offline  
Old 24/03/2009, 09:43 PM   #5
MenaceX^
High-roller
 
Join Date: Aug 2008
Posts: 3,768
Reputation: 13
Default Re: protect my PM

Set a timer that if the player writes more than %d letters per a %d seconds he gets this message.
MenaceX^ is offline  
Old 24/03/2009, 09:48 PM   #6
WhiteHouse
Little Clucker
 
Join Date: Mar 2009
Posts: 7
Reputation: 0
Default Re: protect my PM

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?
WhiteHouse is offline  
Old 24/03/2009, 09:54 PM   #7
MenaceX^
High-roller
 
Join Date: Aug 2008
Posts: 3,768
Reputation: 13
Default Re: protect my PM

Yes because you had less/too many brackets.
Show your code.
MenaceX^ is offline  
Old 24/03/2009, 09:59 PM   #8
WhiteHouse
Little Clucker
 
Join Date: Mar 2009
Posts: 7
Reputation: 0
Default Re: protect my PM

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
WhiteHouse is offline  
Old 24/03/2009, 10:02 PM   #9
Mikep
High-roller
 
Join Date: Apr 2008
Posts: 1,819
Reputation: 2
Default Re: protect my PM

If your looking for a PM antispam, i'm about to release one.
Mikep is offline  
Old 24/03/2009, 10:05 PM   #10
WhiteHouse
Little Clucker
 
Join Date: Mar 2009
Posts: 7
Reputation: 0
Default Re: protect my PM

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
WhiteHouse is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[How To] Protect your source! _[HuN]_Epsilon_ Help Archive 7 05/12/2009 01:33 PM
Protect gamemode V4N0M0US Help Archive 3 16/08/2009 07:18 AM
How to protect your computer Correlli Everything and Nothing 20 29/06/2009 12:13 AM
Un-Write Protect LibertyWorld Everything and Nothing 3 05/03/2009 09:56 PM
DDOS protect russiany General 6 01/03/2009 11:36 AM


All times are GMT. The time now is 03:03 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.