Advertisement
Guest User

Sunnglasses by Fj0rtizFredde

a guest
May 11th, 2010
1,246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.09 KB | None | 0 0
  1. /*
  2. All credits goes to Fj0rtizFredde and the sa-mp wiki :)
  3. Post any suggestions at the sa-mp forums :)
  4. */
  5. #include <a_samp>
  6.  
  7. new Text:SunGlasses;
  8.  
  9. new RandomBacon[][] =
  10. {
  11.     "Oh..You are so cool now!!",
  12.     "Now you look like one of the guys from Matrix!",
  13.     "The girls will go crazy now!",
  14.     "You can change the color and the brightness if you want!",
  15.     "/Brightness :D!",
  16.     "Nice sunglasses!"
  17. };
  18.  
  19. public OnFilterScriptInit()
  20. {
  21.     print("\n--------------------------------------");
  22.     print(" SunGlasses By: Fj0rtizFredde Loaded");
  23.     print("--------------------------------------\n");
  24.     SunGlasses = TextDrawCreate(0.0, 0.0, "_");
  25.     TextDrawFont(SunGlasses, 1);
  26.     TextDrawLetterSize(SunGlasses, 0.0, 50.0);
  27.     TextDrawUseBox(SunGlasses, true);
  28.     TextDrawColor(SunGlasses, 0);
  29.     return 1;
  30. }
  31.  
  32. public OnFilterScriptExit()
  33. {
  34.     print("\n--------------------------------------");
  35.     print(" SunGlasses By: Fj0rtizFredde Unloaded");
  36.     print("--------------------------------------\n");
  37.     TextDrawDestroy(SunGlasses);
  38.     return 1;
  39. }
  40.  
  41. public OnPlayerCommandText(playerid, cmdtext[])
  42. {
  43.     if (strcmp("/sunglasses", cmdtext, true) == 0)
  44.     {
  45.         new randShit = random(sizeof(RandomBacon));
  46.         if(GetPVarInt(playerid, "Bacon") == 0)
  47.         {
  48.             SendClientMessage(playerid,0x21DD00FF, RandomBacon[randShit]);
  49.             SetPVarInt(playerid, "Bacon", 1);
  50.             ApplyAnimation(playerid,"RIOT","RIOT_shout",2.0,0,0,0,0,0);
  51.             TextDrawBoxColor(SunGlasses, 0x00000040);
  52.             TextDrawShowForPlayer(playerid, SunGlasses);
  53.         }
  54.         else
  55.         {
  56.             SetPVarInt(playerid, "Bacon", 0);
  57.             TextDrawHideForPlayer(playerid, SunGlasses);
  58.             ApplyAnimation(playerid,"RIOT","RIOT_shout",2.0,0,0,0,0,0);
  59.             SendClientMessage(playerid,0xE60000FF,"You took of your sunglasses.. You are not cool any more..");
  60.         }
  61.         return 1;
  62.     }
  63.     if (strcmp("/brightness", cmdtext, true) == 0)
  64.     {
  65.         if(GetPVarInt(playerid, "Bacon") == 0) return SendClientMessage(playerid,0xE60000FF,"You dont have any sunglasses on you. (/sunglasses)");
  66.         ShowPlayerDialog(playerid,668,DIALOG_STYLE_INPUT,"Freddes Sunglasses System","Please type in what brightness you want to have\nLight\nNormal\nDark\nDarkest","Ok","Cancel");
  67.         return 1;
  68.     }
  69.     return 0;
  70. }
  71.  
  72. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  73. {
  74.     if(dialogid == 668 && response)
  75.     {
  76.         if(!strcmp(inputtext, "Light", true))
  77.         {
  78.             TextDrawHideForPlayer(playerid, SunGlasses);
  79.             TextDrawBoxColor(SunGlasses, 0x00000025);
  80.             TextDrawShowForPlayer(playerid, SunGlasses);
  81.         }
  82.         if(!strcmp(inputtext, "Normal", true))
  83.         {
  84.             TextDrawHideForPlayer(playerid, SunGlasses);
  85.             TextDrawBoxColor(SunGlasses, 0x00000040);
  86.             TextDrawShowForPlayer(playerid, SunGlasses);
  87.         }
  88.         if(!strcmp(inputtext, "Dark", true))
  89.         {
  90.             TextDrawHideForPlayer(playerid, SunGlasses);
  91.             TextDrawBoxColor(SunGlasses, 0x00000055);
  92.             TextDrawShowForPlayer(playerid, SunGlasses);
  93.         }
  94.         if(!strcmp(inputtext, "Darkest", true))
  95.         {
  96.             TextDrawHideForPlayer(playerid, SunGlasses);
  97.             TextDrawBoxColor(SunGlasses, 0x00000065);
  98.             TextDrawShowForPlayer(playerid, SunGlasses);
  99.         }
  100.     }
  101.     return 1;
  102. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement