Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //VARIABILE
- #define DIALOG_HH 30
- new Newbie[MAX_PLAYERS];
- new NewbieText[MAX_PLAYERS][256];
- //LA ONPLAYERCONNECT
- format(NewbieText[playerid], 256, "None");
- Newbie[playerid] = 0;
- //COMENZI
- function HelperHelpDialog(playerid) {
- new string[1024];
- format(string, sizeof(string), "Helper 1 (Trial Helper)\n");
- strcat(string, "/nre /nlist /hcolor\n");
- strcat(string, "\n");
- strcat(string, "Helper 2 (Junior Helper)\n");
- strcat(string, "/ndelete\n");
- strcat(string, "\n");
- strcat(string, "Helper 3 (General Helper)\n");
- strcat(string, "\n");
- ShowPlayerDialog(playerid, DIALOG_HH, DIALOG_STYLE_MSGBOX, "Helper Commands", string, "Ok","");
- return 1;
- }
- CMD:newbie(playerid, params[]) return cmd_n(playerid, params);
- CMD:n(playerid, params[])
- {
- new result[256], string[256];
- if(PlayerInfo[playerid][pAdmin] != 0) return SCM(playerid, COLOR_GREY, "Nu poti trimite o intrebare deoarece faci parte din staff!");
- if(PlayerInfo[playerid][pHelper] != 0) return SCM(playerid, COLOR_GREY, "Nu poti trimite o intrebare deoarece faci parte din staff!");
- if(sscanf(params, "s[256]", result)) return SCM(playerid, COLOR_GREY, "Syntax: {FFFFFF}/newbie <text>");
- if(Newbie[playerid] != 0) return SCM(playerid, COLOR_GREY, "Ai deja o intrebare activa. Asteapta pana cand un helper iti v-a raspunde!");
- Newbie[playerid] = 1;
- format(string, sizeof(string), "(NEWBIE) %s (%d) ask: %s",GetName(playerid), playerid, result);
- SendHelperMessage(COLOR_YELLOW, string);
- format(NewbieText[playerid], 256, result);
- return 1;
- }
- CMD:nre(playerid, params[])
- {
- if(PlayerInfo[playerid][pHelper] < 1) return SCM(playerid, -1, AdminOnly);
- new id, reason[256];
- if(sscanf(params, "us[256]", id, reason)) return SCM(playerid, COLOR_GREY, "Syntax: {FFFFFF}/nre <playerid/name> <message>");
- if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat!");
- if(Newbie[id] != 1) return SCM(playerid, COLOR_GREY, "Acel player nu a trimis nicio intrebare.");
- Newbie[id] = 0;
- new string[256], str[256];
- format(string, sizeof(string), "* Newbie %s: %s", GetName(id), NewbieText[id]);
- SCMAll(NCOLOR, string);
- format(str, sizeof(str), "Helper %s: %s", GetName(playerid), reason);
- SCMAll(NCOLOR, str);
- SCM(playerid, COLOR_CYAN, "Intrebarea ta a fost trimisa catre helperi!");
- new day, month, year,hour, minute, second;
- gettime(hour, minute, second);
- getdate(year, month, day);
- new File:newbies = fopen("Logs/NewbieLog.rpg", io_append);
- new strr[256];
- format(strr, sizeof(strr), "[%d/%d/%d | %d:%d:%d]%s to %s: %s\r\n",day, month, year, hour, minute, second, GetName(playerid), GetName(id), reason);
- fwrite(newbies, strr);
- fclose(newbies);
- return 1;
- }
- CMD:ndelete(playerid, params[])
- {
- if((PlayerInfo[playerid][pHelper] < 2)) return SCM(playerid, -1, AdminOnly);
- new id, reason[256];
- if(sscanf(params, "us[256]", id, reason)) return SCM(playerid, COLOR_GREY, "Syntax: {FFFFFF}/ndelete <playerid/name> <reason>");
- if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat!");
- if(Newbie[id] != 1) return SCM(playerid, COLOR_GREY, "Acel player nu a trimis nicio intrebare.");
- Newbie[id] = 0;
- new string[256], str[256];
- format(string, sizeof(string), "Helper %s ti-a sters intrebarea. Motiv: %s",GetName(playerid), reason);
- SCM(id, COLOR_YELLOW, string);
- format(str, sizeof(str), "I-ai sters intrebarea lui %s. Motiv: %s", GetName(id), reason);
- SCM(playerid, COLOR_CYAN, str);
- return 1;
- }
- CMD:nlist(playerid, params[])
- {
- if((PlayerInfo[playerid][pHelper] < 1 && PlayerInfo[playerid][pAdmin] < 1)) return SCM(playerid, -1, AdminOnly);
- new string[256];
- SCM(playerid, 0xFFC400FF, "----------Newbie List----------");
- foreach(Player, i) {
- if(IsPlayerConnected(i) && Newbie[i] != 0) {
- format(string, sizeof(string), "(%d) %s: %s", i, GetName(i), NewbieText[i]);
- SCM(playerid, 0x93D94CFF, string);
- }
- }
- return 1;
- }
- CMD:helperhelp(playerid, params[]) return cmd_ah(playerid, params);
- CMD:hhelp(playerid, params[]) return cmd_ah(playerid, params);
- CMD:hh(playerid, params[]) {
- if((PlayerInfo[playerid][pHelper] < 1 && PlayerInfo[playerid][pAdmin] < 1)) return SCM(playerid, -1, AdminOnly);
- HelperHelpDialog(playerid);
- return 1;
- }
- CMD:hcolor(playerid, params[])
- {
- if(PlayerInfo[playerid][pHelper] < 1) return 1;
- SetPlayerColor(playerid, 0xFF4D00FF);
- SCM(playerid, -1, "{FF4D00}Server: {FFFFFF}Culoare schimbata cu succes!");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement