Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MysqlQueryPersonnalStat()
- {
- if( isDefined( game[ "mysql" ] ) ) {
- colorskill=0;
- colorratio=0;
- colorrank=0;
- skill = 0;
- ratio = 0;
- clientid = 1;
- rankllllll = 0;
- sqlquery = "SELECT C.id,round(S.ratio, 2),round(S.skill) FROM " + level.dvar[ "db_clients" ] + " AS C," + level.dvar[ "db_xlrplayerstats" ] + " AS S WHERE C.id = S.client_id AND C.guid = " + self getGuid() + " ";
- mysql_query( game[ "mysql" ], sqlquery );
- arr = mysql_fetch_row( game[ "mysql" ] );
- keys = getArrayKeys(arr);
- for(j = 0; j < keys.size; j++)
- {
- skill = arr[keys[0]];
- ratio = arr[keys[1]];
- clientid = arr[keys[2]];
- colorratio = int( arr[keys[1]] );
- if ( int( arr[keys[0]] ) >= 1600 ) {colorskill=6;}
- else if ( int( arr[keys[0]] ) >= 1475 ) {colorskill=2;}
- else if ( int( arr[keys[0]] ) >= 1100 ) {colorskill=3;}
- else {colorskill=1;}
- if ( colorratio >= 1 ) {colorratio=2;} else {colorratio=1;}
- }
- query = "SELECT COUNT(S.skill) AS rank FROM " + level.dvar[ "db_xlrplayerstats" ] + " AS S WHERE S.skill >= " + skill + " ORDER BY S.skill DESC";
- mysql_query( game[ "mysql" ], query );
- rankllllll = mysql_fetch_row( game[ "mysql" ] );
- if ( int(rankllllll["rank"]) == 1 ) {colorrank=6;}
- else if ( int(rankllllll["rank"]) == 2 ) {colorrank=5;}
- else if ( int(rankllllll["rank"]) == 3 ) {colorrank=2;}
- else if ( int(rankllllll["rank"]) <= 25 ) {colorrank=3;}
- else {colorrank=1;}
- return "^3| ^7Ranked ^" + colorrank + "#" + int(rankllllll["rank"]) + " ^3| ^7Ratio[K/D] ^" + colorratio + ratio + " ^3| ^7Skill ^" + colorskill + skill + " ^3|";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement