SA-MP Forums Archive
Audio Plugin - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Audio Plugin (/showthread.php?tid=250521)



Audio Plugin - MEC - 23.04.2011

i'm trying to add audio plugin into my gm. but i keep getting this error when compiling.

C:\Users\MEC\Desktop\C_VS_C\gamemodes\SF_C_VS_C.pw n(447) : error 017: undefined symbol "playerid"

this is that line:
Audio_PlayStreamed(playerid, "http://radio.forumgods.com:8000/listen.pls", false, false, false);

isnt that right though? doesnt matter how i do it. keeps telling me that playerid isnt defined.


Re: Audio Plugin - Unknown123 - 23.04.2011

Where did you put the line?

use like:

pawn Code:
COMMAND:play(playerid, params[])
{
    Audio_PlayStreamed(playerid, "http://radio.forumgods.com:8000/listen.pls", false, false, false);
}



Re: Audio Plugin - MEC - 23.04.2011

public OnGameModeInit()
{
Audio_PlayStreamed(playerid, "http://radio.forumgods.com:8000/listen.pls", false, false, false);

thats where i put it. but yeah i think i'll just turn it into a command


Re: Audio Plugin - sciman001 - 23.04.2011

put it on... onplayerconnect or something... there isnt a playerid in ongamemodeinit.


Re: Audio Plugin - PCheriyan007 - 23.04.2011

try this
pawn Code:
new Radio[MAX_PLAYERS];

public OnPlayerSpawn(playerid)
{
    Radio[playerid] = Audio_PlayStreamed(playerid, "http://radio.forumgods.com:8000/listen.pls", false, false, false);
}

public OnPlayerDeath(playerid, killerid, reason)
{
    Audio_Stop(playerid, Radio[playerid]);
}