SA-MP Forums Archive
this is not working men - 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: this is not working men (/showthread.php?tid=331682)



this is not working men - spd_sahil - 05.04.2012

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid,-691.5498,934.7952,13.6328,10) == 1 && RadioOn == 1)
    {
        if(!GetPVarInt(playerid,"spawn"))
        {
                SetPVarInt(playerid,"spawn",1);
                if(RadioOn == 1)
                {
                    if(Genre == 1)
                    {
                        PlayAudioStreamForPlayer(playerid,"http://somafm.com/tags.pls",-691.5498,934.7952,13.6328,25,1);
                    }
                    if(Genre == 2)
                    {
                        PlayAudioStreamForPlayer(playerid,"http://173.236.56.82:8004/listen.pls",-691.5498,934.7952,13.6328,25,1);
                    }
                    if(Genre == 3)
                    {
                        PlayAudioStreamForPlayer(playerid,"http://173.192.224.123:8543/listen.pls",-691.5498,934.7952,13.6328,25,1);
                    }
                    if(Genre == 4)
                    {
                        PlayAudioStreamForPlayer(playerid,"http://stream.hitparty.net:8000/listen.pls",-691.5498,934.7952,13.6328,25,1);
                    }
                    if(Genre == 5)
                    {
                        PlayAudioStreamForPlayer(playerid,"http://uplink.duplexfx.com:8010/listen.pls",-691.5498,934.7952,13.6328,25,1);
                    }
                    if(Genre == 6)
                    {
                        PlayAudioStreamForPlayer(playerid,"http://www.acousticalternative.com/listen.pls",-691.5498,934.7952,13.6328,25,1);
                    }
                }
        }
    }
    if(IsPlayerInRangeOfPoint(playerid,-691.5498,934.7952,13.6328,10) == 0)
    {
        if(GetPVarInt(playerid,"spawn") && !IsPlayerInAnyVehicle(playerid))
        {
            DeletePVar(playerid,"spawn");
            StopAudioStreamForPlayer(playerid);
        }
    }
    return 1;
}



Re: this is not working men - xXitsgodzillaXx - 05.04.2012

so, what exactly are you trying to do with this, and what is going wrong with it?


Re: this is not working men - spd_sahil - 05.04.2012

alright my bad...

when the player is in range of those co-ordinates.. i want those link to stream according the values of the variable..

BUT..

this entire thing is not working at all


Re: this is not working men - xXitsgodzillaXx - 05.04.2012

Quote:
Originally Posted by spd_sahil
Посмотреть сообщение
alright my bad...

when the player is in range of those co-ordinates.. i want those link to stream according the values of the variable..

BUT..

this entire thing is not working at all
well i see that all of your coordinates are

pawn Код:
-691.5498,934.7952,13.6328
maybe if you changed some of the Parameters also try setting your distance to 25.0 instead of 25 if not then try 50.0


Re: this is not working men - spd_sahil - 05.04.2012

but that shouldnt matter much right ?? or does it ?


Re: this is not working men - MP2 - 05.04.2012

The syntax is wrong in your code.

Correct:
(playerid, Float:range, Float:x, Float:y, Float:z)

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint


Re: this is not working men - xXitsgodzillaXx - 05.04.2012

Quote:
Originally Posted by MP2
Посмотреть сообщение
The syntax is wrong in your code.

Correct:
(playerid, Float:range, Float, Float:y, Float:z)

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
oh wow, nice find! i didnt even see that.