Advertisement
Sem_Loreann

Untitled

Apr 15th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. CMD:actorinfo(playerid, params[])
  2. {
  3. new string[600], Name[24];
  4. string = "";
  5. new Cache:result = mysql_query(MySQL, "select `aName` from `actors` where");
  6. new actors = cache_num_rows(MySQL);
  7. if(actors == 0) return SendClientMessage(playerid, -1, "Нет актеров!");
  8. for(new i; i < actors; i ++)
  9. {
  10. cache_get_value_index_int(i, 0, Name, MySQL);
  11. format(string, sizeof(string), "%sName: %s ID: %d\n", string, Name, i);
  12. }
  13. cache_delete(result);
  14. ShowPlayerDialog(playerid, 0, 0, "Все актеры на сервере", string, "Ок", "");
  15. return true;
  16. }
  17.  
  18. new actors = cache_num_rows(MySQL); // 1 строка
  19. cache_get_value_index_int(i, 0, Name, MySQL); // 2 строка
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement