Radio! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Radio! (
/showthread.php?tid=394644)
Radio! -
Akcent_Voltaj - 23.11.2012
i cant hear radio all time only after i rrestart server..Rep!
PHP код:
forward RadioScena(playerid);
public RadioScena(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,50.0,251.5308,-1807.7228,7.8359))
{
if(!GetPVarInt(playerid,"muzica"))
{
SetPVarInt(playerid,"muzica",1);
PlayAudioStreamForPlayer(playerid, "http://46.102.252.60:8136/",251.5308,-1807.7228,7.8359, 80.0,true);
} //http://radio-crazy.is-a-chef.com:8024/
}
else
{
if(GetPVarInt(playerid,"muzica"))
{
DeletePVar(playerid,"muzica");
StopAudioStreamForPlayer(playerid);
}
}
return 1;
}
PHP код:
ongamemodeinit:
SetTimer("RadioScena", 1000, 1);
Re: Radio! -
ViniBorn - 23.11.2012
Use SetTimerEx
Re: Radio! -
Akcent_Voltaj - 23.11.2012
SetTimerEx("RadioScena", 1000, 0, "i", playerid); ??
Re: Radio! -
Akcent_Voltaj - 24.11.2012
anyone help please??my radio doesent work..
Re: Radio! -
Richie© - 24.11.2012
You need to loop through every player to check if he is at that point.
pawn Код:
public RadioScena()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
IsPlayerInRangeOfPoint(i, .........
}
}