Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:nre(playerid, params[])
- {
- new message[164], nstring[164];
- if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Tu nu esti logat si nu poti sa folosesti aceasta comanda!");
- if(PlayerInfo[playerid][pGamingPerk] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Nu ai acces la aceasta comanda!");
- if(HelperAnswer[playerid] == -1) return SendClientMessage(playerid, COLOR_ERROR, "Nu ai primit o intrebare.");
- if(sscanf(params,"s[164]", message)) return SendClientMessage(playerid, COLOR_SYN,"Sintaxa:{FFFFFF} /nre <raspuns>");
- {
- if(PlayerInfo[playerid][pHelper] >= 1)
- {
- PlayerInfo[playerid][pStaffPoints]++;
- Update(playerid, pStaffPointsx);
- Questions--;
- UpdateStaffTextdraw();
- format(gString, sizeof(gString), "(N) Helper %s: @%s, %s", GetName(playerid),GetName(HelperAnswer[playerid]), message);
- new string2[128];
- if(strlen(gString) > 120)
- {
- strmid(string2, gString, 110, 256);
- strdel(gString, 110, 256);
- format(gString,128,"%s ...",gString);
- format(string2,128,"... %s",string2);
- }
- foreach(new x : Player)
- {
- if(NewbieEnabled[x] == 1)
- {
- format(nstring, sizeof(nstring), "(N) Newbie %s: %s", GetName(HelperAnswer[playerid]),PlayerInfo[HelperAnswer[playerid]][pNewbie]);
- SendClientMessage(x,COLOR_NOB, nstring);
- if(strlen(gString) > 120)
- {
- SendClientMessage(x,COLOR_NOB, gString);
- SendClientMessage(x,COLOR_NOB, string2);
- }
- else
- {
- SendClientMessage(x,COLOR_NOB, gString);
- }
- }
- if(HelperAnswer[x] == playerid)
- {
- format(PlayerInfo[x][pNewbie],164," ");
- HelperAnswer[x] = -1;
- HelperAnswer[playerid] = -1;
- }
- if(strlen(PlayerInfo[x][pNewbie]) > 1 && HelperAnswer[x] == -1)
- {
- format(gString, sizeof(gString), "(Question) %s - lvl %d: %s", GetName(x), PlayerInfo[x][pLevel], PlayerInfo[x][pNewbie]);
- SendClientMessage(playerid, COLOR_NEWBIE, gString);
- HelperAnswer[x] = playerid;
- HelperAnswer[playerid] = x;
- format(gString, sizeof(gString), "Intrebarea ta a fost atribuita helperului %s, te rugam sa astepti raspunsul acestuia.", GetName(HelperAnswer[playerid]));
- SendClientMessage(x,COLOR_NOB,gString);
- SendClientMessage(x,COLOR_NOB,"Chat-ul (/n)ewbie a fost activat automat. Dupa ce primesti un raspuns il poti dezactiva (/nonewbie)");
- break;
- }
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "Nu ai gradul necesar ca sa folosesti aceasta comanda!");
- }
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if(GetTickCount() - SpamCheck2[playerid] < 1000 && SpamCheck2[playerid] != 0 && PlayerInfo[playerid][pAdmin] < 5)
- {
- return 0;
- }
- SpamCheck2[playerid] = GetTickCount();
- if(PlayerInfo[playerid][pMuted] == 1)
- {
- format(gString, sizeof(gString), "Nu poti sa vorbesti momentan. Timp ramas: %d minute", PlayerInfo[playerid][pMuteTime]/60);
- SendClientMessage(playerid, COLOR_ERROR, gString);
- return 0;
- }
- if(SpectatorID[playerid] != INVALID_PLAYER_ID)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot speak while spectating.");
- return 0;
- }
- if(FindAdvertise(text))
- {
- format(gString, sizeof(gString), "(Staff){FFFFFF} %s a scris: %s", GetName(playerid), text);
- ABroadCast(COLOR_LIGHTRED, gString, 1); SendClientMessage(playerid, COLOR_SYN, "* Ai primit kick deoarece sistemul a detectat o reclama in mesajul tau!"); Kick(playerid);
- return 0;
- }
- if(OnCall[playerid] == 1)
- {
- foreach(new i : Player)
- {
- if(Mobile[i] == playerid)
- {
- format(gString, sizeof(gString), "%s Says (cellphone): %s", GetName(playerid), text);
- ProxDetector(20.0, playerid, gString, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
- format(gString, sizeof(gString), "%s Says (cellphone): %s", GetName(playerid), text);
- SendClientMessage(i, COLOR_YELLOW, gString);
- PhoneLog(playerid, i, text, 2);
- }
- }
- }
- else if(InLive[playerid] == 1)
- {
- if(PlayerInfo[playerid][pMember] + PlayerInfo[playerid][pLeader] == 4)
- {
- format(gString, sizeof(gString), "Live Reporter %s: %s", GetName(playerid), text);
- SendClientMessageToAll(COLOR_LIGHTGREEN, gString);
- }
- else
- {
- format(gString, sizeof(gString), "Live Player %s: %s", GetName(playerid), text);
- SendClientMessageToAll(COLOR_LIGHTGREEN, gString);
- }
- }
- else
- {
- if(Undercover[playerid] == 1)
- {
- format(gString, sizeof(gString), "Unknown says: %s", text);
- ProxDetector(20.0, playerid, gString, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
- }
- else
- {
- if(PremiumColor[playerid] == 0)
- {
- format(gString, sizeof(gString), "{FFFFFF}%s:{FFFFFF} %s", GetName(playerid), text);
- }
- else if(PremiumColor[playerid] == 1)
- {
- format(gString, sizeof(gString), "{0087FE}%s:{FFFFFF} %s", GetName(playerid), text);
- }
- else if(PremiumColor[playerid] == 2)
- {
- format(gString, sizeof(gString), "{EBFF00}%s:{FFFFFF} %s", GetName(playerid), text);
- }
- else if(PremiumColor[playerid] == 3)
- {
- format(gString, sizeof(gString), "{1a1a1a}%s:{FFFFFF} %s", GetName(playerid), text);
- }
- else if(PremiumColor[playerid] == 4)
- {
- format(gString, sizeof(gString), "{3ee605}%s:{FFFFFF} %s", GetName(playerid), text);
- }
- else if(PremiumColor[playerid] == 5)
- {
- format(gString, sizeof(gString), "{ed2bfa}%s:{FFFFFF} %s", GetName(playerid), text);
- }
- else if(PremiumColor[playerid] == 6)
- {
- format(gString, sizeof(gString), "{fb8525}%s:{FFFFFF} %s", GetName(playerid), text);
- }
- else if(PremiumColor[playerid] == 7)
- {
- format(gString, sizeof(gString), "{4B0082}%s:{FFFFFF} %s", GetName(playerid), text);
- }
- else if(PremiumColor[playerid] == 8)
- {
- format(gString, sizeof(gString), "{006400}%s:{FFFFFF} %s", GetName(playerid), text);
- }
- else if(PremiumColor[playerid] == 9)
- {
- format(gString, sizeof(gString), "{FF1493}%s:{FFFFFF} %s", GetName(playerid), text);
- }
- else if(PremiumColor[playerid] == 10)
- {
- format(gString, sizeof(gString), "{DB7093}%s:{FFFFFF} %s", GetName(playerid), text);
- }
- else if(PremiumColor[playerid] == 11) //{9ACD32}
- {
- format(gString, sizeof(gString), "{F0E68C}%s:{FFFFFF} %s", GetName(playerid), text);
- }
- else if(PremiumColor[playerid] == 12)
- {
- format(gString, sizeof(gString), "{9ACD32}%s:{FFFFFF} %s", GetName(playerid), text);
- }
- ProxDetector(20.0, playerid, gString, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement