SA-MP Forums Archive
[FilterScript] SAMP-BANS Example Filterscript - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] SAMP-BANS Example Filterscript (/showthread.php?tid=274111)

Pages: 1 2 3 4


Re: SAMP-BANS Example Filterscript - JaTochNietDan - 05.08.2011

Quote:
Originally Posted by wups
View Post
Yeah, JaTochNietDan, you should'v released an include. It would be MUCH easier for people to configure it to their admin scripts.
I will release an include version of it soon, the API should be fairly simple for everyone to understand, it's on the help part of the main site. But for people that don't know what to do I will make an include with the functions in it.


Re: SAMP-BANS Example Filterscript - Dudits - 05.08.2011

Maybe you should add logs for /ban and /unban commands too


Re: SAMP-BANS Example Filterscript - HydraX - 06.08.2011

pawn Code:
C:\Users\Owner\Desktop\SA-MP\filterscripts\Admin_Test.pwn(341) : error 017: undefined symbol "isnull"
C:\Users\Owner\Desktop\SA-MP\filterscripts\Admin_Test.pwn(359) : error 017: undefined symbol "isnull"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.



Re: SAMP-BANS Example Filterscript - MiTToS - 06.08.2011

can I translate for portuguese area?


Re: SAMP-BANS Example Filterscript - JaTochNietDan - 06.08.2011

Quote:
Originally Posted by HydraX
View Post
pawn Code:
C:\Users\Owner\Desktop\SA-MP\filterscripts\Admin_Test.pwn(341) : error 017: undefined symbol "isnull"
C:\Users\Owner\Desktop\SA-MP\filterscripts\Admin_Test.pwn(359) : error 017: undefined symbol "isnull"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Can you show me the script? The only part of my example code that uses isnull is sscanf, which checks if it's defined or not and if it's not it will use its own method of checking, so it shouldn't be a problem.

Quote:
Originally Posted by MiTToS
View Post
can I translate for portuguese area?
Absolutely, this is only an example filterscript showing everyone how you can make use the API of samp-bans.com.


Re: SAMP-BANS Example Filterscript - Knight_Rider - 06.08.2011

i get 3 errors


C:\Users\garg\Desktop\TurfWar\filterscripts\sampba n.pwn(81) : error 017: undefined symbol "isnull"
C:\Users\garg\Desktop\TurfWar\filterscripts\sampba n.pwn(92) : error 017: undefined symbol "isnull"
C:\Users\garg\Desktop\TurfWar\filterscripts\sampba n.pwn(137) : error 017: undefined symbol "isnull"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.


Re: SAMP-BANS Example Filterscript - JaTochNietDan - 06.08.2011

Quote:
Originally Posted by Boy
View Post
i get 3 errors


C:\Users\garg\Desktop\TurfWar\filterscripts\sampba n.pwn(81) : error 017: undefined symbol "isnull"
C:\Users\garg\Desktop\TurfWar\filterscripts\sampba n.pwn(92) : error 017: undefined symbol "isnull"
C:\Users\garg\Desktop\TurfWar\filterscripts\sampba n.pwn(137) : error 017: undefined symbol "isnull"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Ah okay, I see where you guys were getting that error now. I guess I must've had isnull defined in an include somewhere. I've changed the code now so you do not need it, just re-download it now and it should compile fine.


Re: SAMP-BANS Example Filterscript - Knight_Rider - 06.08.2011

Hmmm Na
I got the problem
i reinstalled zcmd.inc and it work fine now


Re: SAMP-BANS Example Filterscript - MiTToS - 06.08.2011

Quote:
Originally Posted by JaTochNietDan
View Post
Absolutely, this is only an example filterscript showing everyone how you can make use the API of samp-bans.com.
Thx.


Re: SAMP-BANS Example Filterscript - DRIFT_HUNTER - 06.08.2011

Nice!
Small bug on website:
When you click logo (server name) its redirect you to http://www.samp-bans.com/server url but it need to redirect just to server url


Re: SAMP-BANS Example Filterscript - JaTochNietDan - 06.08.2011

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
Nice!
Small bug on website:
When you click logo (server name) its redirect you to http://www.samp-bans.com/server url but it need to redirect just to server url
That's because people did not put the "http://" in their links. Although I will implement a feature to make sure that it is set automatically for people who do not include it in their links tomorrow when I make some updates


Re: SAMP-BANS Example Filterscript - DhaniMaximus - 06.08.2011

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
Код:
ginno44_4e3c41f8e5fcb
That's your API key, but you should change it now because with that API key anyone can modify your banlist
ok thanks, i will change my KEY


Re: SAMP-BANS Example Filterscript - OleKristian95 - 07.08.2011

Very nice!
You just made it easier for me to make a temp ban command!!

Thanks alot.


Re: SAMP-BANS Example Filterscript - TouR - 07.08.2011

I am sure you helped so much people with this including me. Thank you for releasing


Re: SAMP-BANS Example Filterscript - OleKristian95 - 07.08.2011

Would be very cool if you made or helped me making this so it bans in hours or days , Would be best if it was days I think.


Re: SAMP-BANS Example Filterscript - JaTochNietDan - 07.08.2011

Quote:
Originally Posted by OleKristian95
Посмотреть сообщение
Would be very cool if you made or helped me making this so it bans in hours or days , Would be best if it was days I think.
Well, with the ban command, if you wanted it to be in hours, all you would have to do is multiply the ban_time variable by 60 to convert it to hours. For example:

pawn Код:
format(post_string, sizeof(post_string), "action=addban&apikey="#APIKEY"&ban_user=%s&ban_reason=%s&ban_admin=%s&ban_ip=%s&ban_time=%d",names[ban_target], ban_reason, names[playerid], ips[ban_target], ban_time * 60);
Or if you wanted to ban in days, you need to do

pawn Код:
ban_time*60*24
I think you get the point


Re: SAMP-BANS Example Filterscript - OleKristian95 - 07.08.2011

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
Well, with the ban command, if you wanted it to be in hours, all you would have to do is multiply the ban_time variable by 60 to convert it to hours. For example:

pawn Код:
format(post_string, sizeof(post_string), "action=addban&apikey="#APIKEY"&ban_user=%s&ban_reason=%s&ban_admin=%s&ban_ip=%s&ban_time=%d",names[ban_target], ban_reason, names[playerid], ips[ban_target], ban_time * 60);
Or if you wanted to ban in days, you need to do

pawn Код:
ban_time*60*24
I think you get the point
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
THANKS ALOT! ^^

By the way, how can I make it work with Ladmin?

I tried to replace if(!IsPlayerAdmin(playerid)) with if(PlayerInfo[playerid][Level] >= 9)) but then All levels lower than 9 could ban but not higher or level 9.


Re: SAMP-BANS Example Filterscript - sniperwars - 09.08.2011

I like the idea of this and I will test this filterscript.


Re: SAMP-BANS Example Filterscript - OleKristian95 - 11.08.2011

I found a bug in the script:

When I type /Ban [PlayerID] [Reason With Space] [Time]
or
/Ban 0 This is a Test 10

It gives me the Usage message

But if I type /Ban [PlayerID] [ReasonInOneWord] [Time]
or
/Ban 0 ThisIsATest 10

Then the ban works.


Re: SAMP-BANS Example Filterscript - JaTochNietDan - 11.08.2011

Quote:
Originally Posted by OleKristian95
Посмотреть сообщение
I found a bug in the script:

When I type /Ban [PlayerID] [Reason With Space] [Time]
or
/Ban 0 This is a Test 10

It gives me the Usage message

But if I type /Ban [PlayerID] [ReasonInOneWord] [Time]
or
/Ban 0 ThisIsATest 10

Then the ban works.
That's a simple error in my logical coding, I've fixed it now, all you had to do was make the reason parameter as the last one you type in.