Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock MensagemLongaPTodos(color,const string[]) //função
- {
- new string1[256], string2[256], string3[256];
- if(strlen(string) > 90) //String maior que 90
- {
- format(string1, sizeof(string1), string);
- format(string2, sizeof(string2), string);
- strdel(string1, 90, 256);
- strdel(string2, 0, 90);
- format(string3, sizeof(string3), "%s ...", string1);
- SendClientMessageToAll(color, string3);
- format(string3, sizeof(string3), "... %s", string2); //Máximo de 30 caracteres depois
- SendClientMessageToAll(color, string3); //envia a mensagem
- return true;
- }
- else
- {
- SendClientMessageToAll(color, string); //Caso não tenha mais de 30 caracteres
- return true;
- }
- }
- ---------------------------------------------------------------------
- if(strcmp(cmd, "/anuncio", true) == 0 || strcmp(cmd, "/an", true) == 0) //by RicardBRasil@JJUUSSSTTIIN
- {
- if(IsPlayerConnected(playerid))
- {
- if(GetPlayerMoney(playerid) < 400)
- {
- SendClientMessage(playerid, COLOR_GREY, "Você não tem 800$");
- return 1;
- }
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "** Você precisa estar logado !");
- return 1;
- }
- if(PlayerInfo[playerid][pLevel] < 2)
- {
- SendClientMessage(playerid, COLOR_GREY, " Você precisa ser Level 2+ para usar este comando !");
- return 1;
- }
- if(PlayerInfo[playerid][pMuted] == 1)
- {
- SendClientMessage(playerid, TEAM_CYAN_COLOR, "Você não pode anunciar , você está silenciado");
- return 1;
- }
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[128];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USE: (/an)uncio [anuncio text]");
- return 1;
- }
- if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
- {
- format(string, sizeof(string), "** Aguarde %d segundos para mandar outro anúncio!", (addtimer/1000));
- SendClientMessage(playerid, COLOR_GRAD2, string);
- return 1;
- }
- if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
- SafeGivePlayerMoney(playerid, -400);
- format(string, sizeof(string), "{CCFFDD}[SN]{9ACD32} %s", result);
- MensagemLongaPTodos(COLOR_LIGHTGREEN, string);
- format(string, sizeof(string), "[AN] %s",sendername, result);
- ABroadCast(COLOR_LIGHTGREEN,string, 4);
- SBizzInfo[7][sbTill] += 200;
- GameTextForPlayer(playerid, "~w~Anuncio enviado:~g~$50", 4321,1);
- OnPlayerUpdateEx(playerid);
- new y,m,d;
- new h,mi,s;
- getdate(y,m,d);
- gettime(h,mi,s);
- format(string, sizeof(string), "[%d/%d/%d](%d:%d:%d) %s (Anunciando): %s",d,m,y,h,mi,s, sendername, result);
- ChatLog(string);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement