[FilterScript] SAMP-BANS Example Filterscript
#21

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.
Reply
#22

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

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.
Reply
#24

can I translate for portuguese area?
Reply
#25

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.
Reply
#26

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.
Reply
#27

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.
Reply
#28

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

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.
Reply
#30

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
Reply
#31

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
Reply
#32

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
Reply
#33

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

Thanks alot.
Reply
#34

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

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.
Reply
#36

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
Reply
#37

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.
Reply
#38

I like the idea of this and I will test this filterscript.
Reply
#39

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.
Reply
#40

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)