Jump to content

návod Jednoduché Rádio Přes Příkaz Pro Nováčky


ToM

Recommended Posts

Čaute lidičky, chtěl bych vám ukázat moje první Online Rádio. Udělal jsem to přes příkaz, z důvodu že přes dialog se to hádá s jinými FS. Tento Tutoriál je hlavně pro nováčky... S tímto se rychle dokážou naučit pawnit :)

 

Musí to být vložený do vašeho GM...

 

Nahoru do pawna:

 

#include <a_samp>

#pragma tabsize 0

#if defined FILTERSCRIPT (Pokud to chcete do GM, vložte pouze "#pragma tabsize 0")

 

OnPlayerConnect

 

SendClientMessage(playerid, 0x008000FF, "Pro spuštění Online Rádia napiš /radia");

 

OnPlayerCommand

 

if (strcmp("/radia", cmdtext, true, 10) == 0)

{

SendClientMessage(playerid, 0x008000FF, "/frekvence1");

SendClientMessage(playerid, 0x008000FF, "/impuls - Rádio Impuls [CZ]");

SendClientMessage(playerid, 0x008000FF, "/evropa 2 - Rádio Evropa 2 [CZ]");

SendClientMessage(playerid, 0x008000FF, "/europa 2 - Rádio Europa 2 [sK]"); // Příkazy pro rádia (Dejte si rádií kolik chcete :) )

}

//__________________________________________________________________________________________________|

if (strcmp("/frekvence1", cmdtext, true, 10) == 0)

{

SendClientMessage(playerid, 0x008000FF, "Spustil jsis Frekvenci 1");

StopAudioStreamForPlayer(playerid);

PlayAudioStreamForPlayer(playerid, "http://icecast4.play...e1-128.mp3.m3u");

}

//__________________________________________________________________________________________________|

if (strcmp("/impuls", cmdtext, true, 10) == 0)

{

SendClientMessage(playerid, 0x008000FF, "Spustil jsis Impuls");

StopAudioStreamForPlayer(playerid);

PlayAudioStreamForPlayer(playerid, "http://icecast5.play...uls128.mp3.m3u");

}

//__________________________________________________________________________________________________|

if (strcmp("/evropa2", cmdtext, true, 10) == 0)

{

SendClientMessage(playerid, 0x008000FF, "Spustil jsis Evropu 2");

StopAudioStreamForPlayer(playerid);

PlayAudioStreamForPlayer(playerid, "http://icecast3.play...pa2-128.mp3.m3u);

}

//__________________________________________________________________________________________________|

if (strcmp("/europa2", cmdtext, true, 10) == 0)

{

SendClientMessage(playerid, 0x008000FF, "Spustil jsis Europu 2");

StopAudioStreamForPlayer(playerid);

PlayAudioStreamForPlayer(playerid, "http://ice2.europa2....-europa2sk-128");

}

//__________________________________________________________________________________________________|

 

if (strcmp("/stopradio", cmdtext, true, 10) == 0)

{

SendClientMessage(playerid, 0x008000FF, "Vypnul jsis rádio");

StopAudioStreamForPlayer(playerid);

}

return 0;

}

 

 

A úplně dolů #endif :)

 

Doufám že se nováčkům v pawně bude docela hodit... Můžete si tam dát rádií kolik chce :)

PS: Já jsem jeden znich :) Toto je můj první TuT :)

 

EDIT: přidávám stopku + naplácal jsem tam jeden nesmysl teď nyní funguje 100%(Kdyžtak hukněte pokud problémy)

  • Líbí se mi to! (+1) 1
Link to comment
Share on other sites

Wrox: Nepochopíš slovo "NOVÁČEK" ?!

 

Gamelaster: Hloupost to teda určitě není, přesvědčoval jsem se i u jiných FS a bylo tomu tak :)

  • Líbí se mi to! (+1) 1
Link to comment
Share on other sites

Ahoj chci se zeptat je i možnost aby to hrálo všem lidem když to dam ja třeba přes RCON aby to hrálo všem co budou třeba u jednoho místa dávám příklad třeba WANG všichni co bou na wangu to uslyší a ty co třeba u autoškoly v SF už ne ?

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...