View Single Post
Old 26/03/2020, 10:35 PM   #3
MarianImmortalGod
Big Clucker
 
Join Date: Mar 2018
Posts: 80
Reputation: 1
Default Re: Can't use command

Quote:
Originally Posted by l0gic View Post
https://forum.sa-mp.com/showthread.php?t=481257
It would save some memory
PHP Code:
#include <ps-format>
CMD:members(playeridparams[]) {
    new 
s[100];
    
format(s100"select * from users where member = '%d' order by rank desc"PlayerInfo[playerid][pLeader]);
    new 
Cache:cq mysql_query(handles);
    new 
Packed:bs[1024] = !"Nume\tGrad\tZile\n",
        
name[24],
        
rank,
        
days,
        
raport;
    for(new 
icache_num_rows(); ji++){
        
// getting database variable into local variable, makes sense not other way
        
cache_get_value_name(i"Name"name);
        
cache_get_value_name_int(i"Rank"rank);
        
cache_get_value_name_int(i"FactionDays"days);
        
cache_get_value_name_int(i"FactionRaport"raport);
        
format(bs1024, !"%s%s\t%d (%d rapoarte) %s\t%d\n"
            
bsnamerankraportGetPlayerID(name) != INVALID_PLAYER_ID ? ("Online") : ("Offline"), days);
    }
    
cache_delete(cq);
    
ShowPlayerDialog(playeridDIALOG_FACTIONMEMBERSDIALOG_STYLE_TABLIST_HEADERS"Membri factiunii tale"bs"Ok""Exit");
    return 
1;

Thx, but i the download link from that ps-format expired. link ?
MarianImmortalGod is offline   Reply With Quote