#include <a_samp>#include <zcmd>#define FILTERSCRIPT#define COLOR_RED 0xFF0000AA#define COLOR_YELLOW 0xFFFF00AA#define XCOLOR_YELLOW FFFF00#define XCOLOR_ORANGE FF9900new zenetimer;public OnFilterScriptInit(){zenetimer = SetTimer(\"RandomZene\", 60000*5, true); //5 percenként indít egy zenétreturn 1;}public OnFilerScriptExit(){KillTimer(zenetimer);return 1;}forward RandomZene();public RandomZene(){for(new playerid; playerid < MAX_PLAYERS; playerid++){ switch(random(7)) { case 0: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Skrillexft.mp3\"); case 1: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Shawn_Minden_Változik.mp3\"); case 2: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Mr.BustaAK26Farkasok.mp3\"); case 3: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/mertanezeset.mp3\"); case 4: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Maroon_5_Sugar.mp3\"); case 5: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Maroon_5_ Animals.mp3\"); case 6: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Kwabs.mp3\"); }}return 1;}
Nem teszteltem. #include <a_samp>#include <zcmd>#define FILTERSCRIPT#define COLOR_RED 0xFF0000AA#define COLOR_YELLOW 0xFFFF00AA#define XCOLOR_YELLOW FFFF00#define XCOLOR_ORANGE FF9900new zenetimer;public OnFilterScriptInit(){zenetimer = SetTimer(\"RandomZene\", 60000*5, true); //5 percenként indít egy zenétreturn 1;}public OnFilerScriptExit(){KillTimer(zenetimer);return 1;}forward RandomZene();public RandomZene(){for(new playerid; playerid < MAX_PLAYERS; playerid++){ switch(random(6)) { case 0: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Skrillexft.mp3\"); case 1: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Shawn_Minden_Változik.mp3\"); case 2: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Mr.BustaAK26Farkasok.mp3\"); case 3: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/mertanezeset.mp3\"); case 4: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Maroon_5_Sugar.mp3\"); case 5: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Maroon_5_ Animals.mp3\"); case 6: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Kwabs.mp3\"); }}return 1;}
#include <a_samp>#include <zcmd>#define FILTERSCRIPT#define COLOR_RED 0xFF0000AA#define COLOR_YELLOW 0xFFFF00AA#define XCOLOR_YELLOW FFFF00#define XCOLOR_ORANGE FF9900new zenetimer;public OnFilterScriptInit(){zenetimer = SetTimer(\"RandomZene\", 60000*5, true); //5 percenként indít egy zenétreturn 1;}public OnFilerScriptExit(){KillTimer(zenetimer);return 1;}forward RandomZene();public RandomZene(){for(new playerid; playerid < MAX_PLAYERS; playerid++){ switch(random(6)) { case 0: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Skrillexft.mp3\"); case 1: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Shawn_Minden_Változik.mp3\"); case 2: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Mr.BustaAK26Farkasok.mp3\"); case 3: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/mertanezeset.mp3\"); case 4: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Maroon_5_Sugar.mp3\"); case 5: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Maroon_5_ Animals.mp3\"); case 6: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Kwabs.mp3\"); }}return 1;}
#define function%0(%1) forward%0(%1);public%0(%1)new zene;public OnGameModeInit() { zene = SetTimer(\"zeneszarsag\", 60000*5, true); return 1;} CMD:random(playerid) return zeneszarsag();function zeneszarsag() { for(new playerid; playerid < MAX_PLAYERS; playerid++) { switch(random(7)) { case 0: PlayAudioStreamForPlayer(playerid, \"https://sites.google.com/site/tokyoidriftstunt/szerver/Skrillexft.mp3\"); case 1: PlayAudioStreamForPlayer(playerid, \"https://sites.google.com/site/tokyoidriftstunt/szerver/Shawn_Minden_Változik.mp3\"); case 2: PlayAudioStreamForPlayer(playerid, \"https://sites.google.com/site/tokyoidriftstunt/szerver/Mr.BustaAK26Farkasok.mp3\"); case 3: PlayAudioStreamForPlayer(playerid, \"https://sites.google.com/site/tokyoidriftstunt/szerver/mertanezeset.mp3\"); case 4: PlayAudioStreamForPlayer(playerid, \"https://sites.google.com/site/tokyoidriftstunt/szerver/Maroon_5_Sugar.mp3\"); case 5: PlayAudioStreamForPlayer(playerid, \"https://sites.google.com/site/tokyoidriftstunt/szerver/Maroon_5_ Animals.mp3\"); case 6: PlayAudioStreamForPlayer(playerid, \"https://sites.google.com/site/tokyoidriftstunt/szerver/Kwabs.mp3\"); } } return 1;}
case 0: {PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Skrillexft.mp3\");SendClientMessage(playerid, -1, \"Zene 1\");}case 1: {PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Shawn_Minden_Változik.mp3\");SendClientMessage(playerid, -1, \"Zene 2\");}case 2: {PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Mr.BustaAK26Farkasok.mp3\");SendClientMessage(playerid, -1, \"Zene 3\");}
forward RandomZene();public RandomZene(){ for(new playerid; playerid < MAX_PLAYERS; playerid++) { switch(random(7)) { case 0: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Skrillexft.mp3\"); case 1: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Ak26szegenyekfegyvere.mp3\"); case 2: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Mr.BustaAK26Farkasok.mp3\"); case 3: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/mertanezeset.mp3\"); case 4: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Maroon_5_Sugar.mp3\"); case 5: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Maroon_5_ Animals.mp3\"); case 6: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Kwabs.mp3\"); } }format(striing,sizeof(striing),\"\"YELLOW\"» [Zene]:\"WHITE\" Autómatikusan el lett indítva egy zene!\",striing);format(striing,sizeof(striing),\"\"YELLOW\"» [Zene]:\"WHITE\" Ha kiakarod kapcsolni a zenét, akkor\"COL_LRED\" /moff\"WHITE\" vagy \"COL_LRED\"/stopmusic\",striing); return 1;}
Így Error!! case 0: {PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Skrillexft.mp3\");SendClientMessage(playerid, -1, \"Zene 1\");}case 1: {PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Shawn_Minden_Változik.mp3\");SendClientMessage(playerid, -1, \"Zene 2\");}case 2: {PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Mr.BustaAK26Farkasok.mp3\");SendClientMessage(playerid, -1, \"Zene 3\");} forward RandomZene();public RandomZene(){ for(new playerid; playerid < MAX_PLAYERS; playerid++) { switch(random(7)) { case 0: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Skrillexft.mp3\"); case 1: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Ak26szegenyekfegyvere.mp3\"); case 2: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Mr.BustaAK26Farkasok.mp3\"); case 3: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/mertanezeset.mp3\"); case 4: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Maroon_5_Sugar.mp3\"); case 5: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Maroon_5_ Animals.mp3\"); case 6: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Kwabs.mp3\"); } }format(striing,sizeof(striing),\"\"YELLOW\"» [Zene]:\"WHITE\" Autómatikusan el lett indítva egy zene!\",striing);format(striing,sizeof(striing),\"\"YELLOW\"» [Zene]:\"WHITE\" Ha kiakarod kapcsolni a zenét, akkor\"COL_LRED\" /moff\"WHITE\" vagy \"COL_LRED\"/stopmusic\",striing); return 1;} [/quote]Így sem jó 0 error és nem adja! Azt a formázott szöveget el is kéne küldeni. forward RandomZene();public RandomZene(){new msg1[128], msg2[128];for(new playerid; playerid < MAX_PLAYERS; playerid++){ switch(random(7)) { case 0: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Skrillexft.mp3\"); case 1: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Shawn_Minden_Változik.mp3\"); case 2: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Mr.BustaAK26Farkasok.mp3\"); case 3: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/mertanezeset.mp3\"); case 4: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Maroon_5_Sugar.mp3\"); case 5: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Maroon_5_ Animals.mp3\"); case 6: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Kwabs.mp3\"); }}format(msg1,sizeof(msg1),\"\"YELLOW\"» [Zene]:\"WHITE\" Autómatikusan el lett indítva egy zene!\"); format(msg2,sizeof(msg2),\"\"YELLOW\"» [Zene]:\"WHITE\" Ha kiakarod kapcsolni a zenét, akkor\"COL_LRED\" /moff\"WHITE\" vagy \"COL_LRED\"/stopmusic\"); SendClientMessageToAll(-1, msg1); SendClientMessageToAll(-1, msg2);return 1;}
forward RandomZene();public RandomZene(){new msg1[128], msg2[128];for(new playerid; playerid < MAX_PLAYERS; playerid++){ switch(random(7)) { case 0: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Skrillexft.mp3\"); case 1: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Shawn_Minden_Változik.mp3\"); case 2: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Mr.BustaAK26Farkasok.mp3\"); case 3: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/mertanezeset.mp3\"); case 4: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Maroon_5_Sugar.mp3\"); case 5: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Maroon_5_ Animals.mp3\"); case 6: PlayAudioStreamForPlayer(playerid, !\"https://sites.google.com/site/tokyoidriftstunt/szerver/Kwabs.mp3\"); }}format(msg1,sizeof(msg1),\"\"YELLOW\"» [Zene]:\"WHITE\" Autómatikusan el lett indítva egy zene!\"); format(msg2,sizeof(msg2),\"\"YELLOW\"» [Zene]:\"WHITE\" Ha kiakarod kapcsolni a zenét, akkor\"COL_LRED\" /moff\"WHITE\" vagy \"COL_LRED\"/stopmusic\"); SendClientMessageToAll(-1, msg1); SendClientMessageToAll(-1, msg2);return 1;}