Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- All credits goes to Fj0rtizFredde and the sa-mp wiki :)
- Post any suggestions at the sa-mp forums :)
- */
- #include <a_samp>
- new Text:SunGlasses;
- new RandomBacon[][] =
- {
- "Oh..You are so {E60000FF}cool {21DD00FF}now!!",
- "Now you look like one of the {FFFF00FF}guys {21DD00FF}from {E60000FF}Matrix!",
- "The girls will go {B360FDFF}crazy {21DD00FF}now!",
- "You can change the the {000000AA}brightness {21DD00FF}if you want!",
- "/Brightness :D!",
- "{00C2ECFF}Nice {F97804FF}sunglasses!"
- };
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" SunGlasses By: Fj0rtizFredde Loaded");
- print("--------------------------------------\n");
- SunGlasses = TextDrawCreate(0.0, 0.0, "_");
- TextDrawFont(SunGlasses, 1);
- TextDrawLetterSize(SunGlasses, 0.0, 50.0);
- TextDrawUseBox(SunGlasses, true);
- TextDrawColor(SunGlasses, 0);
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n--------------------------------------");
- print(" SunGlasses By: Fj0rtizFredde Unloaded");
- print("--------------------------------------\n");
- TextDrawDestroy(SunGlasses);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/sunglasses", cmdtext, true) == 0)
- {
- new randShit = random(sizeof(RandomBacon));
- if(GetPVarInt(playerid, "Bacon") == 0)
- {
- SendClientMessage(playerid,0x21DD00FF, RandomBacon[randShit]);
- SetPVarInt(playerid, "Bacon", 1);
- ApplyAnimation(playerid,"RIOT","RIOT_shout",2.0,0,0,0,0,0);
- TextDrawBoxColor(SunGlasses, 0x00000040);
- TextDrawShowForPlayer(playerid, SunGlasses);
- SetPlayerAttachedObject(playerid,0,19022,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
- }
- else
- {
- SetPVarInt(playerid, "Bacon", 0);
- TextDrawHideForPlayer(playerid, SunGlasses);
- ApplyAnimation(playerid,"RIOT","RIOT_shout",2.0,0,0,0,0,0);
- RemovePlayerAttachedObject(playerid, 0);
- SendClientMessage(playerid,0x21DD00FF,"You took of your sunglasses.. {E60000FF}You are not cool anymore..");
- }
- return 1;
- }
- if (strcmp("/brightness", cmdtext, true) == 0)
- {
- if(GetPVarInt(playerid, "Bacon") == 0) return SendClientMessage(playerid,0xE60000FF,"You dont have any sunglasses on you. (/sunglasses)");
- 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");
- return 1;
- }
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 668 && response)
- {
- if(!strcmp(inputtext, "Light", true))
- {
- TextDrawHideForPlayer(playerid, SunGlasses);
- TextDrawBoxColor(SunGlasses, 0x00000025);
- TextDrawShowForPlayer(playerid, SunGlasses);
- }
- if(!strcmp(inputtext, "Normal", true))
- {
- TextDrawHideForPlayer(playerid, SunGlasses);
- TextDrawBoxColor(SunGlasses, 0x00000040);
- TextDrawShowForPlayer(playerid, SunGlasses);
- }
- if(!strcmp(inputtext, "Dark", true))
- {
- TextDrawHideForPlayer(playerid, SunGlasses);
- TextDrawBoxColor(SunGlasses, 0x00000055);
- TextDrawShowForPlayer(playerid, SunGlasses);
- }
- if(!strcmp(inputtext, "Darkest", true))
- {
- TextDrawHideForPlayer(playerid, SunGlasses);
- TextDrawBoxColor(SunGlasses, 0x00000065);
- TextDrawShowForPlayer(playerid, SunGlasses);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement