Advertisement
Guest User

[FS] Anuncio Dialog - @Riichard

a guest
Apr 14th, 2012
447
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.40 KB | None | 0 0
  1. /*
  2.                         -= Mantenha os Creditos =-
  3.                             Anuncio por Dialog
  4.                              By - @Riichard
  5.                         -= Mantenha os Creditos =-
  6. */
  7. #include <a_samp>
  8. #define Anuncio 30 // Caso está ID ja está sendo usada,modifique !
  9.  
  10. #if defined FILTERSCRIPT
  11. public OnFilterScriptInit()
  12. {
  13.     print("\n--------------------------------------");
  14.     print(" [FS] Anuncio Dialog || By @Riichard");
  15.     print("--------------------------------------\n");
  16.     return 1;
  17. }
  18.  
  19. #endif
  20.  
  21.  
  22. public OnPlayerConnect(playerid)
  23. {
  24.     SendClientMessage(playerid,0x9C9C9CAA,"Sistema [FS] Anuncio por Dialog. By : @Riichard");
  25.     return 1;
  26. }
  27.  
  28. public OnPlayerCommandText(playerid, cmdtext[])
  29. {
  30. if (!strcmp(cmdtext, "/an", true) || !strcmp(cmdtext, "/anuncio", true) || !strcmp(cmdtext, "/anunciar", true))
  31. {
  32. ShowPlayerDialog(playerid,Anuncio,DIALOG_STYLE_INPUT,"{FF0000}- Anuncio","{4F4F4F}Digite o Texto Abaixo:","Anunciar","Cancelar");
  33. }
  34. return 0;
  35. }
  36. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  37. {
  38. if(dialogid == Anuncio)
  39. {
  40. if(response)
  41. {
  42. new str[200];
  43. GetPlayerName(playerid, str, sizeof(str));
  44. SendClientMessageToAll(-1,"{6C7B8B}________________ [ Novo Anuncio ]________________");
  45. format(str, sizeof(str), "{4682B4}[Anuncio] » {A9A9A9}%s{4682B4}(ID:%d) {A9A9A9}Anuncia :{4682B4} %s",str,playerid,inputtext[0]);
  46. SendClientMessageToAll(-1, str);
  47. }
  48. }
  49. return 1;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement