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

Highest Number


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kubad
Senior Member
Join Date: Sep 2015
Location: Czech Republic
Old 04-29-2018 , 10:07   Highest Number
Reply With Quote #1

Hello i need help i make ,,menu" but i need sort by highest numbers in numebers can you help ? and sorry for my english

PHP Code:
    int numebers[32],numberids[32],count 0;
    
char name[32],clientid[2],menus[256];
    for (
int i 1<= GetMaxClientsi++)
    {
        if (!
IsClientConnected(i))
        {
            continue;
        }
        if(!
IsClientInGame(i)) continue;
        
numebers[count] = number[i];
        
numberids[count] = i;
        
count++;
    }
    for (
int i 1<= GetMaxClientsi++)
    {
        if (!
IsClientConnected(i))
        {
            continue;
        }
        if(!
IsClientInGame(i)) continue;
        
GetClientName(numberids[?], namesizeof(name));
        
Format(menussizeof(menus), "%s %i"numberids[?] , number[?]);
        
IntToString(numberids[?], clientidsizeof(clientid));
        
menu.AddItem(clientidmenus);
    } 
Kubad is offline
sdz
Senior Member
Join Date: Feb 2012
Old 04-29-2018 , 22:27   Re: Highest Number
Reply With Quote #2

https://sm.alliedmods.net/new-api/sorting
PHP Code:
SortIntegers(numeberssizeof(numebers), Sort_Descending); 

Last edited by sdz; 04-29-2018 at 22:31.
sdz is offline
Kubad
Senior Member
Join Date: Sep 2015
Location: Czech Republic
Old 04-30-2018 , 08:23   Re: Highest Number
Reply With Quote #3

ty i will try this
Kubad 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 00:33.


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