Recent Kicks and 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: Recent Kicks and Bans. (
/showthread.php?tid=592642)
Recent Kicks and Bans. -
suni - 28.10.2015
hey how can i create a kick and ban records in a dialog like how this guy do this?
this would be good but this seems hard for me to do so i need some help on this one please.
Re: Recent Kicks and Bans. -
Dusan01 - 28.10.2015
Hmm that is simple, just create system witch will save bans in 1 file and load them from 1 file, if ur using mysql that is too easy, just in table bans get 20 last bans reasons etc...
Re: Recent Kicks and Bans. -
Matite - 28.10.2015
That looks familiar.
:P
Re: Recent Kicks and Bans. -
suni - 28.10.2015
i dont use sql my bans save in a text file.
Re: Recent Kicks and Bans. -
suni - 03.11.2015
and yh! i need something like this!
Re: Recent Kicks and Bans. -
Abagail - 04.11.2015
I cannot comprehend why people think that MySQL and INI are substitutes and cant work as a combination while there is no logical reason they can't. If one part of your systems uses MySQL and another doesn't it is alright and won't destroy your gamemode magically.
Matite most likely uses MySQL(as a comparison to other available implementations of the SQL language integrated into PAWN such as SQLite and others). A statement that would be executed following a kick or ban would probably contain the following:
pawn Код:
mysql_format(db, query, sizeof query, "INSERT into `bans` (SQLId, PlayerName, IP, reason, Admin, AdminSQLId, PlayerHash, AdminHash) VALUES (%d, '%s', '%s', '%s', '%s', %d)", PlayerSQL(banned), PlayerName(banned), PlayerIP(banned), PlayerName(playerid), PlayerSQL(playerid)), PlayerHash(banned), PlayerHash(playerid));
The above would represent banned as the player being banned while the playerid holds the player executing the ban(or a kick). Note that MySQL isn't the only option for this, this could be done in INI but I would for obvious reasons advise against it.