Advertisement
Guest User

Untitled

a guest
Oct 13th, 2011
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. #include <a_samp>
  2. #include <dini>
  3. #include <zcmd>
  4.  
  5. #define FILTERSCRIPT
  6.  
  7. #define SCM(%1,%2,%3) SendClientMessage(%1,%2,%3)
  8.  
  9. #define hellrot 0xFF6347AA
  10. #define hellblau 0x33CCFFAA
  11. #define neongelb 0xD8FF2BFF
  12. #define weiss 0xFFFFFFFF
  13.  
  14. #define msg_datei "msg.txt"
  15.  
  16. public OnFilterScriptInit()
  17. {
  18. print("\n--------------------------------------");
  19. print(" Message Filterscript by |GSR|Honig");
  20. print("--------------------------------------\n");
  21. return 1;
  22. }
  23.  
  24. public OnFilterScriptExit()
  25. {
  26. return 1;
  27. }
  28.  
  29. public OnPlayerConnect(playerid)
  30. {
  31. SetPVarInt(playerid,"join",1);
  32. return 1;
  33. }
  34.  
  35. public OnPlayerSpawn(playerid)
  36. {
  37. if(GetPVarInt(playerid,"join") == 1)
  38. {
  39. new str[256];
  40. str = dini_Get(msg_datei,"Nachricht");
  41. ShowPlayerDialog(playerid,77,DIALOG_STYLE_MSGBOX,"{33CCFF}Nachricht des Tages",str,"Schließen","");
  42. SetPVarInt(playerid,"join",0);
  43. }
  44. return 1;
  45. }
  46. COMMAND:cmsg(playerid,params[])
  47. {
  48. if(isnull(params)) return SCM(playerid,hellrot,"Benutze /cmsg (Nachricht)");
  49. if(!IsPlayerAdmin(playerid)) return SCM(playerid,hellrot,"Du bist kein RCON-Admin!");
  50.  
  51. if(!dini_Exists(msg_datei))
  52. {
  53. dini_Create(msg_datei);
  54. dini_Set(msg_datei,"Nachricht",params);
  55. }
  56. else
  57. {
  58. dini_Set(msg_datei,"Nachricht",params);
  59.  
  60. }
  61. new str[128];
  62. format(str,sizeof str,"* INFO: Spawnnachricht erstellt! [ %s ]",params);
  63. SCM(playerid,neongelb,str);
  64. return 1;
  65. }
  66.  
  67. /*
  68. (c) 2011 by |GSR|Honig
  69. Keine Credits entfernen oder ähnliches!
  70. Gefallen euch meine Werke? -> Bald auf der Homepage www.honig-support.de :D
  71.  
  72. */
  73.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement