SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 28/10/2015, 12:44 AM   #1
suni
Huge Clucker
 
Join Date: Aug 2014
Location: Locating...
Posts: 280
Reputation: 0
Default Recent Kicks and Bans.

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.



suni is offline   Reply With Quote
Old 28/10/2015, 08:39 AM   #2
Dusan01
Huge Clucker
 
Dusan01's Avatar
 
Join Date: Jul 2011
Location: Republika Srpska, Prijedor
Posts: 481
Reputation: 42
Default Re: Recent Kicks and Bans.

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

Yesterday is HISTORY
Today is a GIFT
Tomorrow is MYSTERY

TOMORROWLAND


REP+ IF I HELPED!
Dusan01 is offline   Reply With Quote
Old 28/10/2015, 11:03 AM   #3
Matite
Beta Tester
 
Matite's Avatar
 
Join Date: Dec 2006
Location: Australia
Posts: 145
Reputation: 119
Default Re: Recent Kicks and Bans.

That looks familiar.

:P
__________________

GamerX 0.3.7 Server 188.165.219.63:8800
www.gamerxserver.com
Matite is offline   Reply With Quote
Old 28/10/2015, 08:39 PM   #4
suni
Huge Clucker
 
Join Date: Aug 2014
Location: Locating...
Posts: 280
Reputation: 0
Default Re: Recent Kicks and Bans.

i dont use sql my bans save in a text file.
suni is offline   Reply With Quote
Old 03/11/2015, 10:14 PM   #5
suni
Huge Clucker
 
Join Date: Aug 2014
Location: Locating...
Posts: 280
Reputation: 0
Default Re: Recent Kicks and Bans.

and yh! i need something like this!
suni is offline   Reply With Quote
Old 04/11/2015, 01:03 AM   #6
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,139
Reputation: 445
Default Re: Recent Kicks and Bans.

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 Code:
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.
Abagail is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is your recent reputation comments? Superhot Everything and Nothing 236 26/12/2013 08:35 PM
recent player thefatshizms Scripting Help 0 11/05/2012 08:00 PM
/kicks [ID] & /bans [ID] Super_Panda Scripting Help 5 27/11/2011 06:05 PM
How to display total kicks and bans? grand.Theft.Otto Help Archive 4 05/03/2011 06:47 PM
Jetpack bans or kicks ~ + Spec [LL]InstabiC Help Archive 3 02/09/2009 08:10 AM


All times are GMT. The time now is 07:15 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.