SecretBoss

Untitled

Dec 9th, 2015
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. CMD:gangs(playerid, params[])
  2. {
  3. new
  4. string[464],
  5. count = 0
  6. ;
  7. LOOP_PLAYERS(i)
  8. {
  9. if(IsPlayerInGang(i))
  10. {
  11. if(strfind(GetPlayerGang(i), string, true) != -1) { continue; }
  12. LOOP_PLAYERS(j)
  13. {
  14. if(strcmp(GetPlayerGang(j), GetPlayerGang(i), true) == 0)
  15. {
  16. new id = DB::RetrieveKey(Gang_Table,"GangName", GetPlayerGang(playerid));
  17. new tag[20];
  18. DB::GetStringEntry(Gang_Table, id,"GangTag", tag);
  19. format(string, sizeof(string), "%s"yellow"[%s] "white"%s\n", string, tag, GetPlayerGang(j));
  20. count ++;
  21. }
  22. }
  23. }
  24. if(count > 0)
  25. {
  26. ShowPlayerDialog(playerid, 201, DIALOG_STYLE_MSGBOX, "Online Gangs", string, "Close", "");
  27. }
  28. else
  29. {
  30. ShowPlayerDialog(playerid, 201, DIALOG_STYLE_MSGBOX, "Online Gangs", ""white"There are no online gangs at the moment", "Close", "");
  31. }
  32. }
  33. return 1;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment