Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Keep Credits. Even though some of you will delete it and claim it as your own. ;)
- #include <a_samp>
- // Colours
- #define RED 0xE60000FF
- // TextDraw Variables
- new Text:CMDText;
- new Text:CMDText2;
- // Variable that allows you to open a another TextDraw when you type a number in.
- new OnCommandList[MAX_PLAYERS];
- public OnGameModeInit()
- {
- // Textdraws
- CMDText2=TextDrawCreate(130.000000, 120.000000, "Christmas Songs");
- TextDrawAlignment(CMDText2, 2);
- TextDrawBoxColor(CMDText2, 0x000000FF);
- TextDrawColor(CMDText2, RED);
- TextDrawFont(CMDText2, 3);
- TextDrawTextSize(CMDText2, 20.000000, 210.000000);
- TextDrawUseBox(CMDText2, 1);
- CMDText=TextDrawCreate(25.000000, 135.000000, "Songs:~N~~N~ ~G~1. ~Y~Happy Xmas War is Over~N~ ~G~2. ~Y~Mistletoe and Wine~N~ ~G~3. ~Y~Christmas Lights~N~ ~G~4. ~Y~Do They Know It's Christmas?~N~ ~G~5. ~Y~Merry Christmas Everybody");
- TextDrawAlignment(CMDText, 1);
- TextDrawBoxColor(CMDText, 0x00000055);
- TextDrawFont(CMDText, 1);
- TextDrawLetterSize(CMDText, 0.250000, 0.900000);
- TextDrawSetShadow(CMDText, 0);
- TextDrawSetOutline(CMDText, 1);
- TextDrawTextSize(CMDText, 235.000000, 20.000000);
- TextDrawUseBox(CMDText, 1);
- return 1;
- }
- public OnGameModeExit()
- {
- TextDrawDestroy(CMDText);
- TextDrawDestroy(CMDText2);
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if(OnCommandList[playerid] == 1)
- {
- if(strval(text) == 1)
- {
- OnCommandList[playerid]=0;
- PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/whhuprdkgu/Happy_Xmas_War_Is_Over");
- GameTextForPlayer(playerid,"~R~Playing: ~W~Happy xmas War is Over", 5000, 5);
- TextDrawHideForPlayer(playerid,CMDText);
- TextDrawHideForPlayer(playerid,CMDText2);
- return 0;
- }
- if(strval(text) == 2)
- {
- OnCommandList[playerid]=0;
- PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/gdypehmsr0/Mistletoe_and_Wine");
- GameTextForPlayer(playerid,"~R~Playing: ~W~Mistleto and Wine", 5000, 5);
- TextDrawHideForPlayer(playerid,CMDText);
- TextDrawHideForPlayer(playerid,CMDText2);
- return 0;
- }
- if(strval(text) == 3)
- {
- OnCommandList[playerid]=0;
- PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/qeq3sahznx/Christmas_Lights");
- GameTextForPlayer(playerid,"~R~Playing: ~W~Christmas Lights", 5000, 5);
- TextDrawHideForPlayer(playerid,CMDText);
- TextDrawHideForPlayer(playerid,CMDText2);
- return 0;
- }
- if(strval(text) == 4)
- {
- OnCommandList[playerid]=0;
- PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/qmg0lvxq8d/Do_They_Know_It_s_Christmas");
- GameTextForPlayer(playerid,"~R~Playing: ~W~Do they know it's Christmas?", 5000, 5);
- TextDrawHideForPlayer(playerid,CMDText);
- TextDrawHideForPlayer(playerid,CMDText2);
- return 0;
- }
- if(strval(text) == 5)
- {
- OnCommandList[playerid]=0;
- PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/n9kwclglx5/Merry_Christmas_Everybody");
- GameTextForPlayer(playerid,"~R~Playing: ~W~Merry Christmas Everybody", 5000, 5);
- TextDrawHideForPlayer(playerid,CMDText);
- TextDrawHideForPlayer(playerid,CMDText2);
- return 0;
- }
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if((strcmp("/xmassong", cmdtext, true) == 0) || (strcmp("/xs", cmdtext, true) == 0))
- {
- OnCommandList[playerid]=1;
- TextDrawHideForPlayer(playerid,CMDText);
- TextDrawHideForPlayer(playerid,CMDText2);
- TextDrawShowForPlayer(playerid,CMDText);
- TextDrawShowForPlayer(playerid,CMDText2);
- return 1;
- }
- if((strcmp("/stopsong", cmdtext, true) == 0) || (strcmp("/ss", cmdtext, true) == 0))
- {
- StopAudioStreamForPlayer(playerid); // Stop the audio stream
- return 1;
- }
- return 0;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(newkeys == KEY_FIRE)
- {
- TextDrawHideForPlayer(playerid,CMDText);
- TextDrawHideForPlayer(playerid,CMDText2);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement