Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:gangs(playerid, params[])
- {
- new
- string[464],
- count = 0
- ;
- LOOP_PLAYERS(i)
- {
- if(IsPlayerInGang(i))
- {
- if(strfind(GetPlayerGang(i), string, true) != -1) { continue; }
- LOOP_PLAYERS(j)
- {
- if(strcmp(GetPlayerGang(j), GetPlayerGang(i), true) == 0)
- {
- new id = DB::RetrieveKey(Gang_Table,"GangName", GetPlayerGang(playerid));
- new tag[20];
- DB::GetStringEntry(Gang_Table, id,"GangTag", tag);
- format(string, sizeof(string), "%s"yellow"[%s] "white"%s\n", string, tag, GetPlayerGang(j));
- count ++;
- }
- }
- }
- if(count > 0)
- {
- ShowPlayerDialog(playerid, 201, DIALOG_STYLE_MSGBOX, "Online Gangs", string, "Close", "");
- }
- else
- {
- ShowPlayerDialog(playerid, 201, DIALOG_STYLE_MSGBOX, "Online Gangs", ""white"There are no online gangs at the moment", "Close", "");
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment