SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 10/05/2014, 05:25 PM   #1
Nils94
Little Clucker
 
Join Date: Nov 2011
Location: Germany
Posts: 22
Reputation: 0
Default MySQL Toplist

Solved.
Nils94 is offline   Reply With Quote
Old 10/05/2014, 05:36 PM   #2
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,827
Reputation: 1401
Default Re: MySQL Toplist

I'll assume the field for the name is 1. Just be sure you use LIMIT 3 in the query so it won't exceed in temp_Name array.
pawn Code:
new rows = cache_num_rows(), string[100], temp_Name[3][MAX_PLAYER_NAME] = {"N/A", "N/A", "N/A"};
for (new j; j != rows; ++j) cache_get_row(j, 1, temp_Name[j]);
format(string, sizeof (string), "\n\n\n\nP 1: %s\nP 2: %s\nP 3: %s", temp_Name[0], temp_Name[1], temp_Name[2]);
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos 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
TopList +1 REPS! VanSiera Scripting Help 9 24/04/2014 12:44 PM
BlueG MySQL plugin - Failed (plugins/mysql.so: undefined symbol: _Z13stringvprintfPKcPc) linuxthefish Plugin Development 10 13/07/2013 10:56 AM
How do I add a TopList (Lead Board) Eminem 2ka9 Scripting Help 4 20/10/2012 02:31 PM
SA-MP server toplist instead of adverting on forums Ivan_Pantovic General 18 10/03/2011 01:11 PM


All times are GMT. The time now is 03:41 PM.


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