A small help with getting bans - 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: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: A small help with getting bans (
/showthread.php?tid=500055)
A small help with getting bans -
rakshith122 - 11.03.2014
I use >
jBan include for bans on my server
Everything works perfect. But, I just want to know something. I would like to show a dialog for player who connects(if he is banned). It should check his ban_time, ban_reason, ban_time, time remaining, and the one who banned the player and show a dialog containing all these information to the user who is connecting(if banned).
I just want to know how to get those details from my MySQL database.
Some one help me! D:
Re: A small help with getting bans -
yvoms - 11.03.2014
here is the code for getting information from the database,
Код:
if(strlen(account) > 24) return SendClientMessage(playerid, COLOR_RED, "Player name cannot exceed 24 characters.");
{
format(Query, sizeof(Query), "SELECT Username, Reason, Admin, IP FROM `Bans` WHERE `Username` = '%s' AND `Banned` = 1 LIMIT 1", account);
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows() == 0)
Re: A small help with getting bans -
rakshith122 - 11.03.2014
you didn't understand the rest of the question.
I would like to show a dialog containing all these information to the player who is connected(only if he is banned)