Advertisement
DiGiTaL_AnGeL

DXTC

Feb 2nd, 2013
492
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.62 KB | None | 0 0
  1. /* DDDDD      @  GGGGGGGGGG  @  TTTTTTTTTTTTTT  AAAAAAAA LL              AAAAAAAA NN    NN GGGGGGGGGG EEEEEEEE LL
  2.    DDDDDDD   III GGGGGGGGGG III TTTTTT  TTTTTT  AAA  AAA LL              AAA  AAA NN    NN GGGGGGGGGG EEE      LL
  3.    DD    DD  I I GG         I I      T  T       AA    AA LL              AA    AA NN    NN GG         EE       LL
  4.    DD    DDD I I GG         I I      T  T       AAA  AAA LL              AAA  AAA NNNN  NN GG         EE       LL
  5.    DD    DDD I I GG   GGGGG I I      T  T       AAAAAAAA LL              AAAAAAAA NN NN NN GG   GGGGG EEEEEE   LL
  6.    DD    DD  I I GG      GG I I      T  T       AA    AA LL              AA    AA NN  NNNN GG      GG EE       LL
  7.    DDDDDDD   I I GGGGGGG GG I I      T  T       AA    AA LL              AA    AA NN    NN GGGGGGG GG EEE      LL
  8.    DDDDD     III GGGGGGGGGG III      TTTT       AA    AA LLLLLLLLL       AA    AA NN    NN GGGGGGGGGG EEEEEEEE LLLLLLLLL
  9.  
  10.     This FS allows you to create Christmas trees in game. The trees won't appear after you type the cmd, but the function fir them will appear in your
  11. "scriptfiles" folder in "xmastrees.txt". Copy them under OnGameModeInit, compile and then restart your game. Then, enjoy the xmas trees. :P
  12. */
  13. #define FILTERSCRIPT
  14. //______________________________INCLUDES______________________________________________
  15. #include <a_samp>
  16. #include <YSI\y_commands>
  17.  
  18. #define SCM SendClientMessage
  19. #define BLUE 0x04FBFBC8
  20.  
  21. public OnFilterScriptInit()
  22. {
  23.     print("\n =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
  24.     print(" = DiGitaL Christmas trees creator =");
  25.     print(" =             by DiGiTaL_AnGeL    =");
  26.     print(" =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n");
  27.     return 1;
  28. }
  29.  
  30. public OnFilterScriptExit()
  31. {
  32.     print("\n =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
  33.     print(" = DiGitaL Christmas trees creator =");
  34.     print(" =             by DiGiTaL_AnGeL    =");
  35.     print(" =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n");
  36.     return 1;
  37. }
  38.  
  39. YCMD:xmastree(playerid, params[], help)
  40. {
  41.     if(IsPlayerAdmin(playerid))
  42.     {
  43.         if(help)
  44.         {
  45.             SCM(playerid, BLUE, "Hello! To build a Christmas tree, just type /xmastree. Create as many trees as you want.");
  46.             SCM(playerid, BLUE, "After that, go to your 'scriptfiles' folder, and open xmastrees.txt Copy the lines there under OnGameModeInit in your GM");
  47.             SCM(playerid, BLUE, "Compile, restart your sv, and the XMas trees will appear where you've created them. FS made by DiGiTaL AnGeL™");
  48.         }
  49.         else
  50.         {
  51.             if(isnull(params))
  52.             {
  53.                 SCM(playerid, 0x30401099, "USAGE : /xmastree [comment]");
  54.             }
  55.             else
  56.             {
  57.                 if(fexist("xmastrees.txt"))
  58.                 {
  59.                     SCM(playerid, BLUE, "Christmass tree created! Check scriptfiles\xmastrees.txt!");
  60.                     new File:xmastrees = fopen("/xmastrees.txt", io_append);
  61.                     new Float:x, Float:y, Float:z;
  62.                     new string[115];
  63.                     GetPlayerPos(playerid, x, y, z);
  64.                     format(string, sizeof(string), "\n  CreateObject(19076, %f, %f, %f, 0, 0, 0, 30.0)//%s\r", x, z, y, params);
  65.                     fwrite(xmastrees, string);
  66.                     fclose(xmastrees);
  67.                 }
  68.             }
  69.             return 1;
  70.         }
  71.         return 1;
  72.     }
  73.     else
  74.     {
  75.         SCM(playerid, 0xFF0000FF, "Yiu are not an admin!");
  76.     }
  77.     return 1;
  78. }
  79. YCMD:help(playerid, params[], help)
  80. {
  81.     if (help)
  82.     {
  83.         SendClientMessage(playerid, 0xFF0000AA, "Displays help about a cmd.");
  84.     }
  85.     else
  86.     {
  87.         if (isnull(params))
  88.         {
  89.             new str[128];
  90.             format(str, sizeof (str), "Type \"/%s [command]\" for more help on a command.", Command_GetDisplayNamed("help", playerid));
  91.             SendClientMessage(playerid, 0xFF0000AA, str);
  92.         }
  93.         else
  94.         {
  95.             Command_ReProcess(playerid, params, true);
  96.         }
  97.     }
  98.     return 1;
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement