SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 10/06/2011, 11:12 AM   #1
Sascha
High-roller
 
Sascha's Avatar
 
Join Date: Jul 2009
Location: Germany
Posts: 1,266
Reputation: 57
Default IpCheck - Advertisement

Hey guys,
as I've seen a few questions about it on the forum and also got some requests by friends about something like this,
I decided to create a small function that allows you to check any text/string for an included IP.

The include contains a simple "IsIp" function that behaves like a boolean.
Here's an example how to use it:
pawn Code:
public OnPlayerText(playerid, text[])
{
    if(IsIp(text))
    {
        SendClientMessage(playerid, 0x999999AA, "You may not advertice!");
        Kick(playerid);
        return 0;
    }
    return 1;
}
So if I would enter "182.395.158.21" (or w/e) into the chat and would use my example above, it would send me a message and kick me from the server.

I hope you guys like it!

External download: My website
or internal download: attached below
Attached Files
File Type: rar ipcheck.rar (426 Bytes, 355 views)
__________________
Filterscripts
Sgt's Driving License - Sgt's Debug - Sgt's RCON Addition - IpCheck - Advertisement
Includes
Sgt's Vehicle Functions
Functions
IsFloat

Trick to get faster and better help: Use (more or less) correct english and explain the problem detailed (and a "please" and "thank you" always helps).

check it out!

Last edited by Sascha; 09/08/2011 at 09:02 AM.
Sascha is offline   Reply With Quote
Old 10/06/2011, 11:50 AM   #2
br0adyb0ii
Big Clucker
 
br0adyb0ii's Avatar
 
Join Date: Sep 2009
Location: Melboure, Australia
Posts: 94
Reputation: 6
Default Re: IpCheck - Adverticement

Nice idea
__________________

SAMP: 65.181.125.116:7777 | TS: 65.181.125.116:9987
www.arpgaming.com
br0adyb0ii is offline   Reply With Quote
Old 10/06/2011, 12:28 PM   #3
Phanto90
Huge Clucker
 
Phanto90's Avatar
 
Join Date: Mar 2011
Location: Milan, Italy
Posts: 352
Reputation: 31
Default Re: IpCheck - Adverticement

Prevent from writing in other way?
Es:
Quote:
182,268,1,2
So writing an ip using commas or different character or making it understandable as this:
Quote:
Go to 192 168 5 254
P.S. Please post on pastebin, I don't want to download just to see the code
__________________


Latest Releases
FilterscriptsIncludesMaps
PRaceSystem v1.3 PBlock v1.1Electronic Shop
PVotekick v1.1PInventory v1.1
________________________
I don't script for money, stop asking for it.

Phanto90 is offline   Reply With Quote
Old 10/06/2011, 01:21 PM   #4
Sascha
High-roller
 
Sascha's Avatar
 
Join Date: Jul 2009
Location: Germany
Posts: 1,266
Reputation: 57
Default Re: IpCheck - Adverticement

Nope, it doesn't prevent players from writing an IP with , : - or w/e... I'm gonna to add such a feature to it, later.
I'll also upload a pastebin
__________________
Filterscripts
Sgt's Driving License - Sgt's Debug - Sgt's RCON Addition - IpCheck - Advertisement
Includes
Sgt's Vehicle Functions
Functions
IsFloat

Trick to get faster and better help: Use (more or less) correct english and explain the problem detailed (and a "please" and "thank you" always helps).

check it out!
Sascha is offline   Reply With Quote
Old 10/06/2011, 01:31 PM   #5
GangsTa_
High-roller
 
GangsTa_'s Avatar
 
Join Date: May 2010
Location: Republic of Moldova
Posts: 1,149
Reputation: 51
Default Re: IpCheck - Adverticement

Works nice for me, thanks.
__________________
Gigabyte GA-970A-D3
AMD FX-6300 3.5GHz 14MB AM3+
Zalman CNPS10X Cooler
Crucial 8,00GB (2x4GB) DDR3 PC3-10600 Ballistix Sport
XFX Radeon R9 270X 2GB GDDR5 256-bit 1000/5600
Western Digital Black 500GB 7200rpm 16MB SATA-III
Zalman Z9 Plus Black ATX
Zalman ZM500-LE 500W
GangsTa_ is offline   Reply With Quote
Old 10/06/2011, 01:41 PM   #6
RealCop228
Godfather
 
Join Date: Feb 2010
Location: Springboro, OH
Posts: 8,268
Reputation: 670
Default Re: IpCheck - Adverticement

This is useless. People will always find a way to advertise on your server. Rather than relying on a faulty system, have a good admin team who knows how to operate. It helps to have anti-spam systems and stuff implemented as well; this way they cannot spam their server IP, website, or name before an admin can ban them.
__________________
Putting [URGENT] in the thread title stops me from opening the thread. Nobody else's problem on this forum is more important that another person's. Try not to be self-centered!
RealCop228 is offline   Reply With Quote
Old 10/06/2011, 01:53 PM   #7
gamer931215
High-roller
 
gamer931215's Avatar
 
Join Date: Feb 2010
Location: That box in front of your house stealing your wifi.
Posts: 1,274
Reputation: 307
Default Re: IpCheck - Adverticement

Quote:
Originally Posted by RealCop228 View Post
This is useless. People will always find a way to advertise on your server. Rather than relying on a faulty system, have a good admin team who knows how to operate. It helps to have anti-spam systems and stuff implemented as well; this way they cannot spam their server IP, website, or name before an admin can ban them.
True, but admins have a life too and yeah you can better do all you can against advertising/cheaters/hackers as just leaving it as it ?

Nice script m8
__________________

Thanks to Zh3r0 for this awesome signature!
gamer931215 is offline   Reply With Quote
Old 10/06/2011, 02:08 PM   #8
Sascha
High-roller
 
Sascha's Avatar
 
Join Date: Jul 2009
Location: Germany
Posts: 1,266
Reputation: 57
Default Re: IpCheck - Adverticement

Quote:
Originally Posted by RealCop228 View Post
This is useless. People will always find a way to advertise on your server. Rather than relying on a faulty system, have a good admin team who knows how to operate. It helps to have anti-spam systems and stuff implemented as well; this way they cannot spam their server IP, website, or name before an admin can ban them.
Correct, this function cannot prevent players from adverticing, spamming, etc., however it can help you. It can be used as a support for spam scripts or w/e. Rember: This is just a function, not a whole script.
__________________
Filterscripts
Sgt's Driving License - Sgt's Debug - Sgt's RCON Addition - IpCheck - Advertisement
Includes
Sgt's Vehicle Functions
Functions
IsFloat

Trick to get faster and better help: Use (more or less) correct english and explain the problem detailed (and a "please" and "thank you" always helps).

check it out!
Sascha is offline   Reply With Quote
Old 10/06/2011, 02:14 PM   #9
Varkoll_
High-roller
 
Varkoll_'s Avatar
 
Join Date: Dec 2009
Location: Peut-ŕtre pas sur Terre ?
Posts: 1,927
Reputation: 60
Default Re : IpCheck - Adverticement

Good job
__________________
Varkoll_ is offline   Reply With Quote
Old 10/06/2011, 02:18 PM   #10
RealCop228
Godfather
 
Join Date: Feb 2010
Location: Springboro, OH
Posts: 8,268
Reputation: 670
Default Re: IpCheck - Adverticement

Quote:
Originally Posted by gamer931215 View Post
True, but admins have a life too and yeah you can better do all you can against advertising/cheaters/hackers as just leaving it as it ?

Nice script m8
It all depends on the size of your admin team. If you can always have at least one admin in-game at all times, things should run much smoother than when there isn't one. If someone is immature enough to go on another server and spam it with their server IP address, then obviously that server is horrible and ran by idiots; why would any loyal members of your server leave and connect to the one which was just spammed? You don't see LS-RP having this kind of a system active, but look at their player base- they don't want to loose players- but they know they aren't going to.

Quote:
Originally Posted by Sascha View Post
Correct, this function cannot prevent players from adverticing, spamming, etc., however it can help you. It can be used as a support for spam scripts or w/e. Rember: This is just a function, not a whole script.
You're spelling it wrong, it's advertising. It may be a function, but it's kind of a useless function IMHO.
__________________
Putting [URGENT] in the thread title stops me from opening the thread. Nobody else's problem on this forum is more important that another person's. Try not to be self-centered!
RealCop228 is offline   Reply With Quote
Reply

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



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


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