Audio Plugin
#1

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.
Reply
#2

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);
}
Reply
#3

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
Reply
#4

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

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]);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)