Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 4500:
- {
- if(!response)
- {
- hidePlayerDialog(playerid);
- }
- else
- {
- SelFaction[playerid] = listitem+1;
- if(SelFaction[playerid] >= 7) SelFaction[playerid] =SelFaction[playerid] SelFaction[playerid]f+1;
- new lead[MAX_PLAYER_NAME], members;
- format(lead, MAX_PLAYER_NAME,"None");
- new query[500];
- new stringy[256];
- mysql_format(handle, stringy, 256, "SELECT * FROM `playeraccounts` WHERE `playerGroup` = '%d' AND `playerGroupRank` = '7'", listitem);
- new Cache: resultz = mysql_query (handle, stringy);
- if(cache_get_row_count() != 0)
- {
- for ( new i, j = cache_get_row_count ( ); i != j; ++i )
- {
- cache_get_field_content(i, "playerName", result), format(lead, MAX_PLAYER_NAME, result);
- }
- }
- cache_delete(resultz);
- new stringy2[256];
- mysql_format(handle, stringy2, 256, "SELECT * FROM `playeraccounts` WHERE `playerGroup` = '%d'", SelFaction[playerid]);
- new Cache: resultx = mysql_query (handle, stringy2);
- format(query, sizeof(query),"SELECT * FROM playeraccounts WHERE playerGroup = %d", SelFaction[playerid]);
- members = cache_get_row_count();
- cache_delete(resultx);
- new szDialogText[256];
- new on = 0;
- foreach(Player, t)
- {
- if(PlayerData[t][pGroup] == SelFaction[playerid])
- {
- on++;
- }
- }
- new id = GetPlayerID(lead);
- if(id != INVALID_PLAYER_ID)
- {
- format(szDialogText,256,"Group info:\n\nGroup name: %s\nID: %i\nMembers: %d/%d\nMembers online: %d\nLeader: %s (online)",groupVariables[SelFaction[playerid]][gGroupName],SelFaction[playerid],members,groupVariables[SelFaction[playerid]][gSlots],on,lead);
- }
- else
- {
- format(szDialogText,256,"Group info:\n\nGroup name: %s\nID: %i\nMembers: %d/10\nMembers online: %d\nLeader: %s (offline)",groupVariables[SelFaction[playerid]][gGroupName],SelFaction[playerid],members,on,lead);
- }
- ShowPlayerDialog(playerid, 4600,DIALOG_STYLE_MSGBOX,"Group Info", szDialogText,"Find HQ", "Cancel");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement