Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new Helpers = 0;
- CMD:xemtatcacauhoi(playerid, params[])
- {
- if(GetPVarInt(playerid, "HelperDuty") == 0)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban dang offduty Helpers, khong the lam viec nay!");
- }
- else if(PlayerInfo[playerid][pHelper] >= 1)
- {
- new string[128], reason[64];
- SendClientMessageEx(playerid, COLOR_GREEN, "____________CAU HOI____________");
- foreach(new i: Player)
- {
- if(GetPVarInt(i, "HELPERS_REQUEST"))
- {
- GetPVarString(i, "CauHoi", reason, 64);
- format(string, sizeof(string), "%s(%i) | Thoi gian cau hoi: %i Phut(/xemcauhoi %i).", GetPlayerNameEx(i), i, GetPVarInt(i, "ThoiGian"), i);
- SendClientMessageEx(playerid, COLOR_REPORT, string);
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_REPORT, "Hien tai chua co cau hoi nao dua ra.");
- }
- }
- }
- return 1;
- }
- CMD:xemcauhoi(playerid, params[])
- {
- if(GetPVarInt(playerid, "HelperDuty") == 0)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban dang offduty Helpers, khong the lam viec nay!");
- }
- else if(PlayerInfo[playerid][pHelper] >= 1)
- {
- if(sscanf(params, "u", params[0])) return SendClientMessageEx(playerid, COLOR_GREY, "Su dung: /xemcauhoi [playerid]");
- {
- if(GetPVarInt(params[0], "YeuCau") == 0)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Nguoi do chua dua ra cau hoi.");
- }
- else
- {
- foreach(new i: Player)
- {
- new reason[128];
- if(GetPVarInt(i, "HELPERS_REQUEST"))
- {
- GetPVarString(i, "CauHoi", reason, 128);
- new str[2460], str1[1280], str2[1280], str3[1280], str4[1280], name[1280];
- format(str1, sizeof(str), "{FFFFFF}ID: %s", GetPlayerNameEx(params[0]));
- format(str2, sizeof(str), "Cau hoi: \n%s",reason);
- format(str3, sizeof(str), "Thoi gian cau hoi: %i phut", GetPVarInt(i, "ThoiGian"));
- format(str4, sizeof(str), "{FFFF00}Su dung lenh /dap [playerid][noi dung]");
- format(str, sizeof(str), "%s\n\n%s\n\n%s\n%s\n", str1,str2,str3,str4);
- format(name, sizeof(name), "Xem cau hoi - %s", GetPlayerNameEx(params[0]));
- ShowPlayerDialog(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, name, str, "Ok", "");
- }
- }
- }
- }
- }
- return 1;
- }
- CMD:huybocauhoi(playerid, params[])
- {
- new stringcac[128];
- if(!gPlayerLogged{playerid})
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban chua dang nhap.");
- }
- else if(GetPVarInt(playerid, "YeuCau") == 0)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co cau hoi nao de huy bo.");
- }
- else
- {
- DeletePVar(playerid,"CauHoi");
- DeletePVar(playerid,"YeuCau");
- SendClientMessageEx(playerid, COLOR_WHITE,"Ban da huy bo cau hoi cua ban.");
- format(stringcac, sizeof(stringcac), "%s da huy bo cau hoi cua chinh minh.",GetPlayerNameEx(playerid));
- //SendDutyHelperMessage(TEAM_AZTECAS_COLOR, string);
- foreach(new i: Player)
- {
- if(PlayerInfo[i][pHelper] >=1)
- {
- SendClientMessage(i, COLOR_YELLOW, stringcac);
- }
- }
- }
- return 1;
- }
- CMD:dap(playerid, params[])
- {
- if(PlayerInfo[playerid][pHelper] < 1)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong phai la Helpers.");
- }
- else if(GetPVarInt(playerid, "HelperDuty") == 0) {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban dang offduty Helpers, khong the lam viec nay!");
- }
- else
- {
- new Player,
- reason[64],
- stringg[128];
- if(sscanf(params, "us[64]", Player, reason))
- {
- SendClientMessageEx(playerid, COLOR_GREY, "SU DUNG: /dap [playerid] [text]");
- }
- else if(Player == playerid)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong the chap nhan cau hoi tu chinh minh.");
- }
- else if(GetPVarInt(Player, "YeuCau") == 0)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Nguoi do chua dua ra cau hoi.");
- }
- else
- {
- format(stringg, sizeof(stringg), "%s da tra loi cau hoi cua %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(Player));
- //SendDutyHelperMessage(TEAM_AZTECAS_COLOR, string);
- foreach(new i: Player)
- {
- if(PlayerInfo[i][pHelper] >=1)
- {
- SendClientMessage(i, COLOR_NEWBIE, stringg);
- }
- }
- format(stringg, sizeof(stringg), "[%s] da chap nhan cau hoi cua ban.",GetPlayerNameEx(playerid));
- SendClientMessageEx(Player, COLOR_GREEN, stringg);
- new stringdi[128];
- new stringme[128];
- GetPVarString(Player, "CauHoi", stringdi, 128);
- if (gNewbie[playerid]==0)
- {
- format(stringdi, sizeof(stringdi),"%s hoi: %s",GetPlayerNameEx(Player), stringdi);
- SendClientMessageToAll(COLOR_NEWBIE, stringdi);
- format(stringme, sizeof(stringme),"[%s] tra loi: %s",GetPlayerNameEx(playerid), reason);
- SendClientMessageToAll(COLOR_NEWBIE, stringme);
- ReportCount[playerid]++;
- ReportHourCount[playerid]++;
- AddCAReportToken(playerid);
- DeletePVar(Player,"CauHoi");
- DeletePVar(Player,"YeuCau");
- }
- return 1;
- }
- }
- return 1;
- }
- new LastMessage[MAX_PLAYERS];
- CMD:newb(playerid, params[])
- {
- if((GetTickCount() - LastMessage[playerid]) < 60000)
- return SendClientMessage(playerid, COLOR_GREY, "Phai Doi 60 Giay Sau Moi Hoi Tiep.");
- new stringloz[128];
- if(isnull(params))
- {
- SendClientMessageEx(playerid, COLOR_GREY, "SU DUNG: /newb [noi dung]");
- return 1;
- }
- if(Helpers < 1)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Hien tai chua co Helpers nao Onduty, vui long cho!");
- return 1;
- }
- if(PlayerInfo[playerid][pHelper] == 1)
- {
- SendClientMessageEx(playerid, COLOR_RED, "Ban la Helper khong the su dung lenh nay de tranh spam!");
- return 1;
- }
- if(PlayerInfo[playerid][pHelper] >= 2)
- {
- SendClientMessageEx(playerid, COLOR_RED, "Ban la Advisors khong the su dung lenh nay de tranh spam!");
- return 1;
- }
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- SendClientMessageEx(playerid, COLOR_RED, "Ban la Admin khong the su dung lenh nay de tranh spam!");
- return 1;
- }
- if(GetPVarInt(playerid, "YeuCau") == 1)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da gui cau hoi cua ban len kenh newb, vui long doi ho tra loi.");
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Neu ban doi qua lau hay su dung lenh(/huybocauhoi).");
- }
- if(gNewbie[playerid]==1)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban da bi vo hieu hoa kenh chat Newbie, /tognewbie de hoat dong tro lai!");
- return 1;
- }
- if ((nonewbie))
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "Kenh newbie da bi vo hieu hoa boi {FF0000}Admin{BFC0C2}");
- return 1;
- }
- format(stringloz, sizeof(stringloz),"%s da dat ra mot cau hoi, su dung (/xemcauhoi %i).", GetPlayerNameEx(playerid), playerid);
- // SendDutyHelperMessage(TEAM_AZTECAS_COLOR, string);
- foreach(new i: Player)
- {
- if(PlayerInfo[i][pHelper] >=1)
- {
- SendClientMessage(i, COLOR_NEWBIE, stringloz);
- }
- }
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da gui cau hoi cua ban len kenh newb, vui long doi ho tra loi.");
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Neu ban doi qua lau hay su dung lenh(/huybocauhoi).");
- SetPVarInt(playerid, "HELPERS_REQUEST", 1);
- SetPVarInt(playerid, "ThoiGian", 3);
- SetTimerEx("ThoiGianNgung", 30000, 0, "d", playerid);
- SetPVarInt(playerid, "YeuCau", 1);
- SetPVarString(playerid, "CauHoi", params);
- return 1;
- }
- CMD:hduty(playerid, params[])
- {
- if(PlayerInfo[playerid][pHelper] >= 1)
- {
- if(GetPVarInt(playerid, "HelperDuty") == 1)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da Offduty Helpers, ban khong nhan duoc mot cau hoi nao nua.");
- DeletePVar(playerid, "HelperDuty");
- Helpers -= 1;
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da Onduty Helpers, bay gio ban co the nhan cau hoi tu members.");
- SetPVarInt(playerid, "HelperDuty", 1);
- Helpers += 1;
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD1, "Ban khong phai la Helpers");
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment