Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:ang(playerid, params[])
- {
- new org = GetPlayerOrg(playerid);
- if(IsACop(playerid) || org == 4 || org == 16 || org == 20)
- return SendClientMessage(playerid, COLOR_GREY, "Você não pode mandar anuncio da organização.");
- if(PlayerInfo[playerid][pJailed] == 9)
- {
- SendClientMessage(playerid,COLOR_GRAD1," Você não pode usar este comando nas Celas da Administração!");
- return true;
- }
- if(gettime() < GetPVarInt(playerid, #VarFlood6))
- return SendClientMessage(playerid, COLOR_GRAD1, #Você não pode fazer isto com tanta frequencia);
- SetPVarInt(playerid, #VarFlood6, gettime()+1);
- if(PlayerInfo[playerid][pConnectTime] < 2)
- return SendClientMessage(playerid,COLOR_GRAD2," Você só poderá mandar anuncios após 2 horas jogadas no servidor!");
- if(PlayerInfo[playerid][pCargo] < 3)
- return SendClientMessage(playerid,COLOR_GRAD2," Você precisa ter o cargo 3 para poder mandar anuncio da organização!");
- if(AntiDivulguer(playerid, params))return 1;
- new string[255];
- new payout = strlen(params) * 50;
- if(GetPlayerMoney(playerid) < payout)
- {
- format(string, sizeof(string), "Você usou %d caracteres e custou $%d, Você não tem esse Dinheiro.", params, payout);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- return 1;
- }
- if(isnull(params))return SendClientMessage(playerid, COLOR_GRAD1, "USE: /ang [Anuncio da ORG]");
- if(gettime() < GetPVarInt(playerid, #VarFlood15))
- {
- format(string, sizeof string, "Voçê Só pode Mandar outro /ang daqui a %s.", ConvertTime(GetPVarInt(playerid, #VarFlood15)-gettime()));
- SendClientMessage(playerid, COLOR_GRAD1, string);
- return 1;
- }
- SetPVarInt(playerid, #VarFlood15, gettime()+90);
- GiveDinheiro(playerid, - payout);
- SBizzInfo[7][sbTill] += payout;
- ExtortionSBiz(7, payout);
- Atualizar3Dtexts();
- format(string, sizeof(string), "• {FFFFFF}Você pagou R$%d pelo seu anúncio, para a empresa: {00BFFF}%s", payout, SBizzInfo[7][sbMessage]);
- SendClientMessage(playerid, 0x00BFFFAA, string);
- if(org == 8) format(string, sizeof string, "{696969}|----------------------({FFFFFF}Anúncio %s{696969})----------------------|", GetOrgNameAng(org));
- else if(org == 22) format(string, sizeof string, "{B0DDF3}|----------------------({FFFFFF}Anúncio %s{B0DDF3})----------------------|", GetOrgNameAng(org));
- if(org !=8 && org != 22) format(string, sizeof string, "{%s}|----------------------({FFFFFF}Anúncio %s{%s})----------------------|", GetPlayerColorEx(playerid), GetOrgNameAng(org), GetPlayerColorEx(playerid));
- SendClientMessageToAll(-1, string);
- format(string, sizeof string, "» [ID: %d] %s: %s", playerid, NomePlayer(playerid), params);
- SendClientMessageToAll(GetPlayerColor(playerid), string);
- return 1;
- }
- CMD:an(playerid, result[])
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " Você Não Está Logado !");
- return 1;
- }
- if(PlayerInfo[playerid][pJailed] == 9)
- {
- SendClientMessage(playerid,COLOR_GRAD1," Você não pode usar este comando nas Celas da Administração!");
- return true;
- }
- if(PlayerInfo[playerid][pConnectTime] < 6)
- {
- SendClientMessage(playerid,COLOR_GRAD2," Você só poderá mandar anuncios após 6 horas jogadas no servidor!");
- return true;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(sscanf(result, "s[400]", result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USE: (/an)uncio [Texto para anunciar]");
- return 1;
- }
- //Anti Divulguer
- if(AntiDivulguer(playerid, result))return 1;
- new payout = strlen(result) * 50;
- new string[240];
- if(GetPlayerMoney(playerid) < payout)
- {
- format(string, sizeof(string), "Você Usou %d characteres e custou $%d, Você não tem Esse Dinheiro.", strlen(result), payout);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- return 1;
- }
- if(TempoAn[playerid] > 0)
- {
- if(PlayerInfo[playerid][pVIP] <= 1)
- {
- format(string, sizeof(string), "Você não é um player VIP e poderá manda outro anuncio após %d segundos!", TempoAn[playerid]);
- SendClientMessage(playerid,COLOR_GRAD2,string);
- return 1;
- }
- else
- {
- format(string, sizeof(string), "Espere %d segundos para mandar outro anuncio", TempoAn[playerid]);
- SendClientMessage(playerid,COLOR_GRAD2,string);
- return 1;
- }
- }
- if(AnuncioMandado > 0)
- {
- if(PlayerInfo[playerid][pVIP] < 2)
- {
- format(string, sizeof(string), "Você não é um player SUPER-VIP e poderá manda outro anuncio após %d segundos!", AnuncioMandado);
- SendClientMessage(playerid,COLOR_GRAD2,string);
- return 1;
- }
- }
- GiveDinheiro(playerid, - payout);
- SBizzInfo[7][sbTill] += payout;
- ExtortionSBiz(7, payout);
- Atualizar3Dtexts();
- format(string, sizeof(string), "• {FFFFFF}Você pagou R$%d pelo seu anúncio, para a empresa: {00BFFF}%s", payout, SBizzInfo[7][sbMessage]);
- SendClientMessage(playerid, 0x00BFFFAA, string);
- format(string, sizeof(string), "Anúncio: %s, Contato: %s[ID: %d] Celular: [%d].", result,sendername,playerid,PlayerInfo[playerid][pPnumber]);
- SendClientMessageToAll(TEAM_GROVE_COLOR,string);
- format(string, sizeof(string), "~r~Pagou $%d~n~~w~Pelo Anuncio.", payout, strlen(result));
- GameTextForPlayer(playerid, string, 5000, 5);
- if(PlayerInfo[playerid][pVIP] > 1)
- {
- TempoAn[playerid] = 30;
- }
- else
- {
- TempoAn[playerid] = 30+strlen(result);
- }
- AnuncioMandado = 30;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment