Posts: 87
Threads: 27
Joined: Nov 2015
Reputation:
0
06.12.2015, 09:22
(
Последний раз редактировалось XStreeter; 06.12.2015 в 09:49.
Причина: Changed everything
)
1.How can i get all admins online and show they name in textdraw
2. How can i get top 10 Players from mysql R39-3
Please give mee information Thanks
Posts: 87
Threads: 27
Joined: Nov 2015
Reputation:
0
Sorry for this bump but i rlly need help
THANKS
Posts: 87
Threads: 27
Joined: Nov 2015
Reputation:
0
What ?
Please tell mee bro
I rlly need help
Posts: 135
Threads: 14
Joined: Mar 2011
Reputation:
0
06.12.2015, 11:21
(
Последний раз редактировалось Antonio144; 06.12.2015 в 15:55.
)
What's your database schema? You need to formulate an sql query.
1. SELECT `userName` from usersTable WHERE `userLevel` = 'admin'; and then check the usernames with usernames that are online. And then just make the textDraws (use wiki if you need help). BUT you should not do this through an sql. You should already have in your script some variable that holds online player's status (admin, vip, regular etc..) And just lopp through that.
EDIT: oh you didn't mean to get the data from database. But it still applies. Just loop through all the online players and check their level.
2. If you have the score it in the same table as users: SELECT `userName`, `score` from usersTable ORDER BY `score` DESC LIMIT 10; If not, you would need to use join statment or inline query.
But without knowing your database schema I can't form the correct query's.
Posts: 87
Threads: 27
Joined: Nov 2015
Reputation:
0
Thanks for 1-st
now the second is my problem
I want to get top 10 players from Database and show them to a textdraw
THANKS
Posts: 87
Threads: 27
Joined: Nov 2015
Reputation:
0
SELECT `userName`, `score` from usersTable ORDER BY `score` DESC LIMIT 10
I mean how to get 10 players from this and show them to textdraw