Radio!
#1

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.835980.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"10001); 
Reply
#2

Use SetTimerEx
Reply
#3

SetTimerEx("RadioScena", 1000, 0, "i", playerid); ??
Reply
#4

anyone help please??my radio doesent work..
Reply
#5

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, .........
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)