Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Simples sistema de anuncio By: GHLEMES
- //Includes
- #include <a_samp>
- //**********************************
- //defines
- #define ANUNCIAR 1000
- #define ana 1001
- #define anp 1002
- //**********************************
- //Public's
- public OnFilterScriptInit()
- {
- print("\n----------------------------------------");
- print("--Sistema de anuncio simples By: GHLEMES--");
- print("----------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- //Comando
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/anunciar", cmdtext, true, 10) == 0)
- {
- ShowPlayerDialog(playerid, ANUNCIAR, DIALOG_STYLE_LIST, "Escolha um Tipo de anuncio:", "Anuncio Player\nAnuncio Admin", "OK", "Fechar");
- return 1;
- }
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == ANUNCIAR)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid,anp,DIALOG_STYLE_INPUT,"Anuncio Player","{FFFFFF}Digite o Texto Abaixo:","Anunciar","Cancelar");
- }
- else if(listitem == 1)
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "{FF0000}[Erro] Você não é um Admin");
- ShowPlayerDialog(playerid,ana,DIALOG_STYLE_INPUT,"Anuncio Admin","{FFFFFF}Digite o Texto Abaixo:","Anunciar","Cancelar");
- }
- }
- }
- if(dialogid == anp)
- {
- if(response)
- {
- new gh[128], gn[24];
- GetPlayerName(playerid, gn, sizeof(gn));
- format(gh, sizeof(gh), "{0062FF}[Anuncio Player] » {FFFFFF}%s(ID:%d) {999999}Anuncia: {FFFFFF}%s",gn,playerid,inputtext[0]);
- SendClientMessageToAll(-1, gh);
- }
- }
- if(dialogid == ana)
- {
- if(response)
- {
- new agh[128], agn[24];
- GetPlayerName(playerid, agn, sizeof(agn));
- format(agh, sizeof(agh), "{FF0000}[Anuncio Admin] » {FFFFFF}%s(ID:%d) {00FF00}Anuncia: %s",agn,playerid,inputtext[0]);
- SendClientMessageToAll(-1, agh);
- }
- }
- return 1;
- }
- //**********************
- /* Sistema de anuncio simples desenvolvido por GHLEMES em: 09/07/2014 postado em: forum.sa-mp.com
- Peço para não retirar os Créditos
- Obrigado!!!
- GHLEMES
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement