Jump to content

Comanda /staffo


Laur-skizzo
 Share

Recommended Posts

Salut.Cer niste ajutor cu urmatoarea comanda.Vreau sa imi arate membrii din staff online cat si offline,dar imi arata doar pe cei care au acelasi grad cu mine.Ma puteti ajuta?
CMD:staffo(playerid, params[])

{
if(PlayerInfo[playerid][pAdmin] >=1 || PlayerInfo[playerid][pHelper] >= 1)
{
new aim[2400],
query[300],
test[300],
test1[300],
test2[300],
test3[300],
test4[300],
result[300];
format(query, sizeof(query), "SELECT * FROM `users` WHERE `users`.`Admin` = '%d' ORDER BY `users`.`Hadm` DESC LIMIT 50", PlayerInfo[playerid][pAdmin]);
new Cache: membresult = mysql_query(SQL, query);
for(new i, j = cache_get_row_count (); i != j; ++i)
{
   cache_get_field_content(i, "Admin", result); format(test1, 300, result);
cache_get_field_content(i, "name", result); format(test, 300, result);
cache_get_field_content(i, "lastOn", result); format(test2, 300, result);
cache_get_field_content(i, "Warn", result); format(test3, 300, result);
cache_get_field_content(i, "Hadm", result); format(test4, 300, result);
new id = GetPlayerID(test);
if(id != INVALID_PLAYER_ID)
{
format(aim, sizeof(aim), "%s %s - %s - online right now - %d Playeri ajutati\n", aim, test1, test, PlayerInfo[playerid][pHelpedPlayers]);
}
else
{
format(aim, sizeof(aim), "%s %s - %s - %s - %d Playeri ajutati\n", aim, test1, test, test2, PlayerInfo[playerid][pHelpedPlayers]);
}
}
cache_delete(membresult);
ShowPlayerDialog(playerid,DIALOG_STAFF,DIALOG_STYLE_LIST,"Members:",aim,"Exit","");
}
return 1;
 
Link to comment
Share on other sites

'DESC LIMIT 50' schimbi in 'DESC LIMIT 20', de ce? pt. un dialog de tip list poate afisa maxim 20 de randuri.

 

format(query, sizeof(query), "SELECT * FROM `users` WHERE `users`.`Admin` >= '1' ORDER BY `users`.`Hadm` DESC LIMIT 20");

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.