Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(dialogid == DIALOG_MEMBERS)
- {
- if(response)
- {
- if(listitem >= 0)
- {
- if(PlayerInfo[playerid][pRank] >= 6)
- {
- new name[30],result[30],query[300],test[5],strings[300];
- format(query, sizeof(query), "SELECT * FROM `users` WHERE `id`='%d'",Selected[playerid][listitem]);
- new Cache: membresult = mysql_query(SQL,query);
- for(new i, j = cache_get_row_count (); i != j; ++i)
- {
- cache_get_field_content(i, "name", result); format(name, 30, result);
- cache_get_field_content(i, "Rank", result); format(test, 5, result);
- }
- cache_delete(membresult);
- Selected2[playerid] = Selected[playerid][listitem];
- format(strings, sizeof(strings),"%s - %s",test,name);
- ShowPlayerDialog(playerid, DIALOG_MEMBERS2, DIALOG_STYLE_LIST, strings, "Change Rank\nFaction Warn\nClear FW\nUninvite - 20 FP\nUninvite - 0 FP", "OK", "Exit");
- }
- }
- }
- }
- if(dialogid == DIALOG_MEMBERS2)
- {
- if(response)
- {
- if(listitem == 0)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Usage: /changerank <id> <rank>");
- }
- if(listitem == 1)
- {
- new string1[256],rank;
- if(PlayerInfo[playerid][pSQLID] == Selected2[playerid]) return SendClientMessage(playerid, COLOR_WHITE, "Nu-ti poti da singur FW.");
- foreach(Player, i)
- {
- if(PlayerInfo[i][pSQLID] == Selected2[playerid])
- {
- if(PlayerInfo[playerid][pRank] == 6 && PlayerInfo[i][pRank] == 7 || PlayerInfo[playerid][pRank] == 6 && PlayerInfo[i][pRank] == 6) return SendClientMessage(playerid, COLOR_WHITE, "Nu-i poti da FW unui membru de rank 6-7.");
- }
- }
- format(string1, sizeof(string1), "SELECT * FROM `users` WHERE `id`='%d'",Selected2[playerid]);
- new Cache: membresult = mysql_query(SQL,string1);
- for(new i, j = cache_get_row_count (); i != j; ++i)
- {
- rank = cache_get_field_content_int(i, "Rank");
- }
- cache_delete(membresult);
- if(PlayerInfo[playerid][pRank] == 6 && rank == 6 || PlayerInfo[playerid][pRank] == 6 && rank == 7) return SendClientMessage(playerid, COLOR_WHITE, "Nu-i poti da FW unui membru de rank 6-7.");
- ShowPlayerDialog(playerid, DIALOG_FWARN, DIALOG_STYLE_MSGBOX, "Esti sigur?", "Esti sigur ca vrei sa-i dai FW acelui membru?", "Da", "Nu");
- }
- if(listitem == 2)
- {
- new string1[256],rank;
- if(PlayerInfo[playerid][pSQLID] == Selected2[playerid]) return SendClientMessage(playerid, COLOR_WHITE, "Nu-ti poti da singur clear FW.");
- foreach(Player, i)
- {
- if(PlayerInfo[i][pSQLID] == Selected2[playerid])
- {
- if(PlayerInfo[playerid][pRank] == 6 && PlayerInfo[i][pRank] == 7 || PlayerInfo[playerid][pRank] == 6 && PlayerInfo[i][pRank] == 6) return SendClientMessage(playerid, COLOR_WHITE, "Nu-i poti da FW clear unui membru de rank 6-7.");
- }
- }
- format(string1, sizeof(string1), "SELECT * FROM `users` WHERE `id`='%d'",Selected2[playerid]);
- new Cache: membresult = mysql_query(SQL,string1);
- for(new i, j = cache_get_row_count (); i != j; ++i)
- {
- rank = cache_get_field_content_int(i, "Rank");
- }
- cache_delete(membresult);
- if(PlayerInfo[playerid][pRank] == 6 && rank == 6 || PlayerInfo[playerid][pRank] == 6 && rank == 7) return SendClientMessage(playerid, COLOR_WHITE, "Nu-i poti da FW clear unui membru de rank 6-7.");
- ShowPlayerDialog(playerid, DIALOG_FUNWARN, DIALOG_STYLE_MSGBOX, "Esti sigur?", "Esti sigur ca vrei sa-i stergi FW acelui membru?", "Da", "Nu");
- }
- if(listitem == 3)
- {
- if(PlayerInfo[playerid][pSQLID] == Selected2[playerid]) return SendClientMessage(playerid, COLOR_WHITE, "Nu-ti poti da singur uninvite.");
- foreach(Player, i)
- {
- if(PlayerInfo[i][pSQLID] == Selected2[playerid])
- {
- if(PlayerInfo[playerid][pRank] == 6 && PlayerInfo[i][pRank] == 7 || PlayerInfo[playerid][pRank] == 6 && PlayerInfo[i][pRank] == 6) return SendClientMessage(playerid, COLOR_WHITE, "Nu-i poti da uninvite unui membru de rank 6-7.");
- }
- }
- new stringtotal[500],string1[256],ftime,result[30],name[30],rank;
- format(string1, sizeof(string1), "SELECT * FROM `users` WHERE `id`='%d'",Selected2[playerid]);
- new Cache: membresult = mysql_query(SQL,string1);
- for(new i, j = cache_get_row_count (); i != j; ++i)
- {
- ftime = cache_get_field_content_int(i, "FactionTime");
- cache_get_field_content(i, "name", result); format(name, 30, result);
- rank = cache_get_field_content_int(i, "Rank");
- }
- cache_delete(membresult);
- if(PlayerInfo[playerid][pRank] == 6 && rank == 6 || PlayerInfo[playerid][pRank] == 6 && rank == 7) return SendClientMessage(playerid, COLOR_WHITE, "Nu-i poti da uninvite unui membru de rank 6-7.");
- format(string1, sizeof(string1),"Doresti sa ii dai uninvite lui %s CU 20 FP?\nAcesta are %d zile in factiune.\nScrie motiv-ul pentru care ii acorzi uninvite:",name,ftime);
- format(stringtotal, sizeof(stringtotal),"< ATENTIE >: Playerii cu 14 zile in factiune, le poti da uninvite fara FP, daca acesta a abuzat ii poti da uninvite cu 40 FP.\n%s",string1);
- ShowPlayerDialog(playerid, DIALOG_FPUNINVITE, DIALOG_STYLE_INPUT, "Uninvite - 20 FP", stringtotal, "Uninvite", "Exit");
- }
- if(listitem == 4)
- {
- if(PlayerInfo[playerid][pSQLID] == Selected2[playerid]) return SendClientMessage(playerid, COLOR_WHITE, "Nu-ti poti da singur uninvite.");
- foreach(Player, i)
- {
- if(PlayerInfo[i][pSQLID] == Selected2[playerid])
- {
- if(PlayerInfo[playerid][pRank] == 6 && PlayerInfo[i][pRank] == 7 || PlayerInfo[playerid][pRank] == 6 && PlayerInfo[i][pRank] == 6) return SendClientMessage(playerid, COLOR_WHITE, "Nu-i poti da uninvite unui membru de rank 6-7.");
- }
- }
- new stringtotal[500],string1[256],ftime,result[30],name[30],rank;
- format(string1, sizeof(string1), "SELECT * FROM `users` WHERE `id`='%d'",Selected2[playerid]);
- new Cache: membresult = mysql_query(SQL,string1);
- for(new i, j = cache_get_row_count (); i != j; ++i)
- {
- ftime = cache_get_field_content_int(i, "FactionTime");
- cache_get_field_content(i, "name", result); format(name, 30, result);
- rank = cache_get_field_content_int(i, "Rank");
- }
- cache_delete(membresult);
- if(PlayerInfo[playerid][pRank] == 6 && rank == 6 || PlayerInfo[playerid][pRank] == 6 && rank == 7) return SendClientMessage(playerid, COLOR_WHITE, "Nu-i poti da uninvite unui membru de rank 6-7.");
- format(string1, sizeof(string1),"Esti pe cale sa-i dai uninvite lui %s FARA FP.\nAcesta are %d zile in factiune.\nScrie motivul pentru uninvite mai jos:",name,ftime);
- format(stringtotal, sizeof(stringtotal),"Atentie!!! Playerii ce au sub 14 zile in factiune se vor da afara cu FP, cu exceptia cazurilor in care un owner iti spune ca e ok sa dai uninvite fara FP.\n%s",string1);
- ShowPlayerDialog(playerid, DIALOG_NOUNINVITE, DIALOG_STYLE_INPUT, "Uninvite - 0 FP", stringtotal, "Uninvite", "Exit");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement