[Include] jBan - MySQL Ban System with timed bans
#21

Nice One man
Reply
#22

Ehm when i include this in my script, i can't start up my server, and when i look inside the inlclude i notice that you have J_sscanf defined in a stock.
But i'm already using sscanf sow could you explain what J_sscanf is?
Reply
#23

Nice
Код:
Player                 Admin          Reason                     Time                 Time Left         
JaTochNietDan	        Stumpy     Deathmatching	2011-07-15 04:12:10	         -2,174
lol
Reply
#24

Hell yea finnaly a good release from J. peace
Reply
#25

Quote:
Originally Posted by *IsBack
Посмотреть сообщение
It's probably this problem:
https://sampforum.blast.hk/showthread.php?tid=268432
I had it with my MySQL ban system too.
I'll have to investigate further, it really doesn't make any sense that it would do that.

Quote:
Originally Posted by justsomeguy
Посмотреть сообщение
Ehm when i include this in my script, i can't start up my server, and when i look inside the inlclude i notice that you have J_sscanf defined in a stock.
But i'm already using sscanf sow could you explain what J_sscanf is?
j_sscanf is just sscanf, I'm not using a compiler if statement to check if it is already included because there wouldn't be a way of recognizing if it's the plugin version or the include version and they both have different syntax so it would cause problems with the script if you were using the plugin version with it.

If your server shuts down on start up, it's most likely caused by the script not being able to connect to the MySQL server, check the details in the include and enable logging so you can see what the last print was in the console, it would not be caused by a stock function, if it was the stock function causing a problem, you would notice that immediately on compilation.
Reply
#26

This is what i was looking for years...and now i got it but please fix the LuXAdmin and jBan interaction bug .....I wish it will be fixed soon...and i really want it ....man your awesome and yeah thanks for the support!!
Reply
#27

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
I'll have to investigate further, it really doesn't make any sense that it would do that.



j_sscanf is just sscanf, I'm not using a compiler if statement to check if it is already included because there wouldn't be a way of recognizing if it's the plugin version or the include version and they both have different syntax so it would cause problems with the script if you were using the plugin version with it.

If your server shuts down on start up, it's most likely caused by the script not being able to connect to the MySQL server, check the details in the include and enable logging so you can see what the last print was in the console, it would not be caused by a stock function, if it was the stock function causing a problem, you would notice that immediately on compilation.
So i can remove that j_sscanf and replace all the j_sscanf with sscanf?
Reply
#28

Quote:
Originally Posted by justsomeguy
Посмотреть сообщение
So i can remove that j_sscanf and replace all the j_sscanf with sscanf?
Technically yes, if the sscanf you're using is not the plugin version. Otherwise you'll have to re-write the syntax a little.
Reply
#29

oh yeah , this is a nice work . good job , bro
Reply
#30

Hi. First of all, thank you for this nice ban system. I have done everything ok, it says the connection to mysql server has succeeded, but when I enter in game it says: "[jBan]: You have an existing ban from "" for "", it will expire in 0 minutes!", why?
Reply
#31

Quote:
Originally Posted by fordawinzz
Посмотреть сообщение
Hi. First of all, thank you for this nice ban system. I have done everything ok, it says the connection to mysql server has succeeded, but when I enter in game it says: "[jBan]: You have an existing ban from "" for "", it will expire in 0 minutes!", why?
That's odd...what are the contents of the ban table?
Reply
#32

PHP код:
  BanID int(6)   No None auto_increment               
  user_banned varchar
(24latin1_swedish_ci  No None                
  user_banned_ip varchar
(15latin1_swedish_ci  No None                
  user_banner varchar
(24latin1_swedish_ci  No None                
  ban_reason varchar
(40latin1_swedish_ci  No None                
  ban_timestamp timestamp  on update CURRENT_TIMESTAMP No CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP               
  ban_time  int
(10
Reply
#33

Can I use this in FS, coz I dont have .pwn from GM. And when i load jban in FS then FS commands dont work. Thx for reply
Reply
#34

I have a problem .. Ban player on 10 minutes / ban x 10 and site testing is the time I left 0 days 0 hours 0 minutes and 10 seconds (so they put the second minute but calculated in minutes) What is problem?
Reply
#35

It is correct when use sscanf to detect ifisplayerconnected ?
I know that sscanf detects automatically if a player is connect by using "ban_target == INVALID_PLAYER_ID"

Look at this command:
Код:
COMMAND:ban(playerid, params[])
{
	if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "[jBan]: You need to be logged in as an RCON administrator to perform this!");
	if(j_sscanf(params, "usi", ban_target, ban_reason, ban_time)) return SendClientMessage(playerid, COLOR_RED, "[jBan]: Correct usage -> /ban <player> <reason> <time (minutes)>");
//>>>	if(!IsPlayerConnected(ban_target)) return SendClientMessage(playerid, COLOR_RED, "[jBan]: Player was not found!");
	if(ban_time < 0) SendClientMessage(playerid, COLOR_RED, "[jBan]: Please input a valid ban time!");
	jBan(ban_target, playerid, ban_reason, ban_time);
	return 1;
}
Reply
#36

Nice, gonna use this.
But can you explain native jUnbanIP(IP[], bool:expired = false); a little more and give an example how to use it and what it does.
Reply
#37

Quote:
Originally Posted by Jeroen52
Посмотреть сообщение
Nice, gonna use this.
But can you explain native jUnbanIP(IP[], bool:expired = false); a little more and give an example how to use it and what it does.
You will find an example command of all natives in archive.
Reply
#38

Quote:
Originally Posted by Rock_Ro
Посмотреть сообщение
You will find an example command of all natives in archive.
Where's that archive?
Reply
#39

Quote:
Originally Posted by fordawinzz
Посмотреть сообщение
Hi. First of all, thank you for this nice ban system. I have done everything ok, it says the connection to mysql server has succeeded, but when I enter in game it says: "[jBan]: You have an existing ban from "" for "", it will expire in 0 minutes!", why?
Open the include
Do control F
pawn Код:
if(mysql_num_rows() != 0)
and change it to
pawn Код:
if(mysql_num_rows() > 0)
JaTochNietDan said.
Reply
#40

Quote:
Originally Posted by Jeroen52
Посмотреть сообщение
Nice, gonna use this.
But can you explain native jUnbanIP(IP[], bool:expired = false); a little more and give an example how to use it and what it does.
You specify the IP that you want to unban. It's explained in the original topic of this post, plus there is an example in the filterscript.

For anyone experiencing that with the false bans, try downloading the include again and re-compiling any scripts you have it included in.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)