how to resume audio for player ? -
Dude_Lebowski - 16.04.2012
Hi all im making a radio script but i cant figure out how to resume audio stream for player when he exits vehicle and enters again.
I made that when player exits a car his audio stream stops automaticly,
and audio stream works only in car so if someone could help me out i'd be greatfull alot.
Re: how to resume audio for player ? -
BigD - 16.04.2012
Quote:
Originally Posted by Dude_Lebowski
Hi all im making a radio script but i cant figure out how to resume audio stream for player when he exits vehicle and enters again.
I made that when player exits a car his audio stream stops automaticly,
and audio stream works only in car so if someone could help me out i'd be greatfull alot.

|
Why don't you do something like,
OnPlayerEnterVehicle
if(PlayerInfo[playerid][pRadioResume] == 1) {
PlayAudioForPlayer <<< or whatever.
then
with the CMD:radioon or w/e
do PlayerInfo[playerid][pRadioResume] = 1; so you set it to one?
Re: how to resume audio for player ? -
Dude_Lebowski - 17.04.2012
Quote:
Originally Posted by Daniel_Davis
Why don't you do something like,
OnPlayerEnterVehicle
if(PlayerInfo[playerid][pRadioResume] == 1) {
PlayAudioForPlayer <<< or whatever.
then
with the CMD:radioon or w/e
do PlayerInfo[playerid][pRadioResume] = 1; so you set it to one?
|
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(102) : error 017: undefined symbol "PlayerInfo"
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(102) : warning 215: expression has no effect
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(102) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(102) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(102) : fatal error 107: too many error messages on one line
How can i define it ?
Re: how to resume audio for player ? -
Mark™ - 17.04.2012
Quote:
Originally Posted by Dude_Lebowski
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(102) : error 017: undefined symbol "PlayerInfo"
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(102) : warning 215: expression has no effect
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(102) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(102) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(102) : fatal error 107: too many error messages on one line
How can i define it ? 
|
PlayerInfo is usually an enumerator, abbreviated as enum in pawno. You need to create an enum called PlayerInfo in your script, before using it in the command.
Re: how to resume audio for player ? -
Dude_Lebowski - 17.04.2012
holy crap now im lost totally i try to include enum but it keeps showing me undefined simbols things
Re: how to resume audio for player ? -
Mark™ - 17.04.2012
Quote:
Originally Posted by Dude_Lebowski
holy crap now im lost totally i try to include enum but it keeps showing me undefined simbols things 
|
You need to
create an enum, how could you possibly include it ?
Let me show you an example of an enum called Info.
pawn Код:
enum Info
{
AdminLevel,
}
new PlayerInfo[MAX_PLAYERS][Info];
Re: how to resume audio for player ? -
Dude_Lebowski - 17.04.2012
Quote:
Originally Posted by Xtreme_playa
You need to create an enum, how could you possibly include it ?
Let me show you an example of an enum called Info.
pawn Код:
enum Info { AdminLevel, } new PlayerInfo[MAX_PLAYERS][Info];
|
yeah i saw that too on wiki and created it under a_samp
just like in example.
But:
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(106) : error 017: undefined symbol "pRadioResume"
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(10

: error 001: expected token: ";", but found "new"
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(185) : error 017: undefined symbol "pRadioResume"
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(186) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(190) : warning 217: loose indentation
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(190) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(190) : error 004: function "OnPlayerExitVehicle" is not implemented
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(195) : error 030: compound statement not closed at the end of file (started at line 185)
:O im just worring about this undefined symbol "pRadioResume" things idk how to fix them.
Re: how to resume audio for player ? -
Mark™ - 17.04.2012
Quote:
Originally Posted by Dude_Lebowski
yeah i saw that too on wiki and created it under a_samp
just like in example.
But:
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(106) : error 017: undefined symbol "pRadioResume"
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(10  : error 001: expected token: ";", but found "new"
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(185) : error 017: undefined symbol "pRadioResume"
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(186) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(190) : warning 217: loose indentation
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(190) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(190) : error 004: function "OnPlayerExitVehicle" is not implemented
C:\Documents and Settings\Admin\Desktop\Server\filterscripts\radio. pwn(195) : error 030: compound statement not closed at the end of file (started at line 185)
:O im just worring about this undefined symbol "pRadioResume" things idk how to fix them.
|
pawn Код:
new pRadioResume[MAX_PLAYERS][name of your enum here];
Re: how to resume audio for player ? -
James Coral - 17.04.2012
pawn Код:
enum pInfo
{
RaadioResume
};
new PlayerInfo[MAX_PLAYERS][pInfo];
Re: how to resume audio for player ? -
Dude_Lebowski - 17.04.2012
i got no errors but when i exit car it stops sound but it doesent resume it