Guest User

Untitled

a guest
Apr 30th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.85 KB | None | 0 0
  1. CMD:ang(playerid, params[])
  2. {
  3. new org = GetPlayerOrg(playerid);
  4. if(IsACop(playerid) || org == 4 || org == 16 || org == 20)
  5. return SendClientMessage(playerid, COLOR_GREY, "Você não pode mandar anuncio da organização.");
  6.  
  7. if(PlayerInfo[playerid][pJailed] == 9)
  8. {
  9. SendClientMessage(playerid,COLOR_GRAD1," Você não pode usar este comando nas Celas da Administração!");
  10. return true;
  11. }
  12.  
  13. if(gettime() < GetPVarInt(playerid, #VarFlood6))
  14. return SendClientMessage(playerid, COLOR_GRAD1, #Você não pode fazer isto com tanta frequencia);
  15. SetPVarInt(playerid, #VarFlood6, gettime()+1);
  16.  
  17. if(PlayerInfo[playerid][pConnectTime] < 2)
  18. return SendClientMessage(playerid,COLOR_GRAD2," Você só poderá mandar anuncios após 2 horas jogadas no servidor!");
  19.  
  20. if(PlayerInfo[playerid][pCargo] < 3)
  21. return SendClientMessage(playerid,COLOR_GRAD2," Você precisa ter o cargo 3 para poder mandar anuncio da organização!");
  22.  
  23. if(AntiDivulguer(playerid, params))return 1;
  24. new string[255];
  25. new payout = strlen(params) * 50;
  26. if(GetPlayerMoney(playerid) < payout)
  27. {
  28. format(string, sizeof(string), "Você usou %d caracteres e custou $%d, Você não tem esse Dinheiro.", params, payout);
  29. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  30. return 1;
  31. }
  32.  
  33. if(isnull(params))return SendClientMessage(playerid, COLOR_GRAD1, "USE: /ang [Anuncio da ORG]");
  34. if(gettime() < GetPVarInt(playerid, #VarFlood15))
  35. {
  36. format(string, sizeof string, "Voçê Só pode Mandar outro /ang daqui a %s.", ConvertTime(GetPVarInt(playerid, #VarFlood15)-gettime()));
  37. SendClientMessage(playerid, COLOR_GRAD1, string);
  38. return 1;
  39. }
  40. SetPVarInt(playerid, #VarFlood15, gettime()+90);
  41. GiveDinheiro(playerid, - payout);
  42. SBizzInfo[7][sbTill] += payout;
  43. ExtortionSBiz(7, payout);
  44. Atualizar3Dtexts();
  45. format(string, sizeof(string), "• {FFFFFF}Você pagou R$%d pelo seu anúncio, para a empresa: {00BFFF}%s", payout, SBizzInfo[7][sbMessage]);
  46. SendClientMessage(playerid, 0x00BFFFAA, string);
  47. if(org == 8) format(string, sizeof string, "{696969}|----------------------({FFFFFF}Anúncio %s{696969})----------------------|", GetOrgNameAng(org));
  48. else if(org == 22) format(string, sizeof string, "{B0DDF3}|----------------------({FFFFFF}Anúncio %s{B0DDF3})----------------------|", GetOrgNameAng(org));
  49. if(org !=8 && org != 22) format(string, sizeof string, "{%s}|----------------------({FFFFFF}Anúncio %s{%s})----------------------|", GetPlayerColorEx(playerid), GetOrgNameAng(org), GetPlayerColorEx(playerid));
  50. SendClientMessageToAll(-1, string);
  51. format(string, sizeof string, "» [ID: %d] %s: %s", playerid, NomePlayer(playerid), params);
  52. SendClientMessageToAll(GetPlayerColor(playerid), string);
  53. return 1;
  54. }
  55. CMD:an(playerid, result[])
  56. {
  57. if(gPlayerLogged[playerid] == 0)
  58. {
  59. SendClientMessage(playerid, COLOR_GREY, " Você Não Está Logado !");
  60. return 1;
  61. }
  62. if(PlayerInfo[playerid][pJailed] == 9)
  63. {
  64. SendClientMessage(playerid,COLOR_GRAD1," Você não pode usar este comando nas Celas da Administração!");
  65. return true;
  66. }
  67. if(PlayerInfo[playerid][pConnectTime] < 6)
  68. {
  69. SendClientMessage(playerid,COLOR_GRAD2," Você só poderá mandar anuncios após 6 horas jogadas no servidor!");
  70. return true;
  71. }
  72. GetPlayerName(playerid, sendername, sizeof(sendername));
  73. if(sscanf(result, "s[400]", result))
  74. {
  75. SendClientMessage(playerid, COLOR_GRAD2, "USE: (/an)uncio [Texto para anunciar]");
  76. return 1;
  77. }
  78.  
  79. //Anti Divulguer
  80. if(AntiDivulguer(playerid, result))return 1;
  81.  
  82. new payout = strlen(result) * 50;
  83. new string[240];
  84. if(GetPlayerMoney(playerid) < payout)
  85. {
  86. format(string, sizeof(string), "Você Usou %d characteres e custou $%d, Você não tem Esse Dinheiro.", strlen(result), payout);
  87. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  88. return 1;
  89. }
  90. if(TempoAn[playerid] > 0)
  91. {
  92. if(PlayerInfo[playerid][pVIP] <= 1)
  93. {
  94. format(string, sizeof(string), "Você não é um player VIP e poderá manda outro anuncio após %d segundos!", TempoAn[playerid]);
  95. SendClientMessage(playerid,COLOR_GRAD2,string);
  96. return 1;
  97. }
  98. else
  99. {
  100. format(string, sizeof(string), "Espere %d segundos para mandar outro anuncio", TempoAn[playerid]);
  101. SendClientMessage(playerid,COLOR_GRAD2,string);
  102. return 1;
  103. }
  104. }
  105. if(AnuncioMandado > 0)
  106. {
  107. if(PlayerInfo[playerid][pVIP] < 2)
  108. {
  109. format(string, sizeof(string), "Você não é um player SUPER-VIP e poderá manda outro anuncio após %d segundos!", AnuncioMandado);
  110. SendClientMessage(playerid,COLOR_GRAD2,string);
  111. return 1;
  112. }
  113. }
  114. GiveDinheiro(playerid, - payout);
  115. SBizzInfo[7][sbTill] += payout;
  116. ExtortionSBiz(7, payout);
  117. Atualizar3Dtexts();
  118. format(string, sizeof(string), "• {FFFFFF}Você pagou R$%d pelo seu anúncio, para a empresa: {00BFFF}%s", payout, SBizzInfo[7][sbMessage]);
  119. SendClientMessage(playerid, 0x00BFFFAA, string);
  120. format(string, sizeof(string), "Anúncio: %s, Contato: %s[ID: %d] Celular: [%d].", result,sendername,playerid,PlayerInfo[playerid][pPnumber]);
  121. SendClientMessageToAll(TEAM_GROVE_COLOR,string);
  122. format(string, sizeof(string), "~r~Pagou $%d~n~~w~Pelo Anuncio.", payout, strlen(result));
  123. GameTextForPlayer(playerid, string, 5000, 5);
  124. if(PlayerInfo[playerid][pVIP] > 1)
  125. {
  126. TempoAn[playerid] = 30;
  127. }
  128. else
  129. {
  130. TempoAn[playerid] = 30+strlen(result);
  131. }
  132. AnuncioMandado = 30;
  133. return 1;
  134. }
Advertisement
Add Comment
Please, Sign In to add comment