Advertisement
Guest User

Untitled

a guest
Nov 28th, 2010
744
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.37 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 {E60000FF}cool {21DD00FF}now!!",
  12.     "Now you look like one of the {FFFF00FF}guys {21DD00FF}from {E60000FF}Matrix!",
  13.     "The girls will go {B360FDFF}crazy {21DD00FF}now!",
  14.     "You can change the the {000000AA}brightness {21DD00FF}if you want!",
  15.     "/Brightness :D!",
  16.     "{00C2ECFF}Nice {F97804FF}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.             SetPlayerAttachedObject(playerid,0,19022,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
  54.         }
  55.         else
  56.         {
  57.             SetPVarInt(playerid, "Bacon", 0);
  58.             TextDrawHideForPlayer(playerid, SunGlasses);
  59.             ApplyAnimation(playerid,"RIOT","RIOT_shout",2.0,0,0,0,0,0);
  60.             RemovePlayerAttachedObject(playerid, 0);
  61.             SendClientMessage(playerid,0x21DD00FF,"You took of your sunglasses.. {E60000FF}You are not cool anymore..");
  62.         }
  63.         return 1;
  64.     }
  65.     if (strcmp("/brightness", cmdtext, true) == 0)
  66.     {
  67.         if(GetPVarInt(playerid, "Bacon") == 0) return SendClientMessage(playerid,0xE60000FF,"You dont have any sunglasses on you. (/sunglasses)");
  68.        
  69.         ShowPlayerDialog(playerid,668,DIALOG_STYLE_INPUT,"Freddes Sunglasses System","Please type in what brightness you want to have\n{21DD00FF}Light\n{1229FAFF}Normal\n{99FFFFAA}Dark\n{000000AA}Darkest","Ok","Cancel");
  70.         return 1;
  71.     }
  72.     return 0;
  73. }
  74.  
  75. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  76. {
  77.     if(dialogid == 668 && response)
  78.     {
  79.         if(!strcmp(inputtext, "Light", true))
  80.         {
  81.             TextDrawHideForPlayer(playerid, SunGlasses);
  82.             TextDrawBoxColor(SunGlasses, 0x00000025);
  83.             TextDrawShowForPlayer(playerid, SunGlasses);
  84.         }
  85.         if(!strcmp(inputtext, "Normal", true))
  86.         {
  87.             TextDrawHideForPlayer(playerid, SunGlasses);
  88.             TextDrawBoxColor(SunGlasses, 0x00000040);
  89.             TextDrawShowForPlayer(playerid, SunGlasses);
  90.         }
  91.         if(!strcmp(inputtext, "Dark", true))
  92.         {
  93.             TextDrawHideForPlayer(playerid, SunGlasses);
  94.             TextDrawBoxColor(SunGlasses, 0x00000055);
  95.             TextDrawShowForPlayer(playerid, SunGlasses);
  96.         }
  97.         if(!strcmp(inputtext, "Darkest", true))
  98.         {
  99.             TextDrawHideForPlayer(playerid, SunGlasses);
  100.             TextDrawBoxColor(SunGlasses, 0x00000065);
  101.             TextDrawShowForPlayer(playerid, SunGlasses);
  102.         }
  103.     }
  104.     return 1;
  105. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement