Raised This Month: $12 Target: $400
 3% 

0


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kellan123
AlliedModders Donor
Join Date: Aug 2012
Old 01-24-2014 , 12:08  
Reply With Quote #1

0.

Last edited by Kellan123; 03-26-2014 at 18:19.
Kellan123 is offline
matsi
Thinkosaur
Join Date: Sep 2006
Old 01-24-2014 , 14:11   Re: Rank System [Problem]
Reply With Quote #2

This is something i used in my old pointsystem plugin:
Code:
public CmdShowRank( client ) {     new szTemp[ 512 ], Data[ 1 ];         Data[ 0 ] = client;         format( szTemp, charsmax( szTemp ), "SELECT COUNT(*) AS rank FROM `pointsystem` WHERE `points` >= %i UNION SELECT COUNT(*) FROM `pointsystem` WHERE `points` >= '0'", gPoints[ client ] );         SQL_ThreadQuery( g_sql_tuple, "HandleRank", szTemp, Data, 1 ); } public HandleRank( FailState, Handle:Query, Error[], Errcode, Data[], DataSize ) {     if( FailState )     {         log_amx("SQL Error: %s (%d)", Error, Errcode)         return PLUGIN_HANDLED     }     new rank, total, client;         client = Data[ 0 ];         while ( SQL_MoreResults( Query ) )     {         if( rank )         {             total = SQL_ReadResult( Query, SQL_FieldNameToNum( Query, "rank" ) );         }         else         {             rank = SQL_ReadResult( Query, SQL_FieldNameToNum( Query, "rank" ) );         }         SQL_NextRow( Query );     }     Print( client, "You are ranked as %i of %i players with %i points", rank, total, gPoints[ client ] );         return PLUGIN_HANDLED; }
__________________

Accepting all kinds of requests via private message.

Last edited by matsi; 01-24-2014 at 14:12.
matsi is offline
Kellan123
AlliedModders Donor
Join Date: Aug 2012
Old 01-24-2014 , 14:26   Re: Rank System [Problem]
Reply With Quote #3

Sss

Last edited by Kellan123; 03-26-2014 at 10:51.
Kellan123 is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 05:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode