CAR AUDIO -
romka - 16.01.2012
Hello samp forum!
PHP код:
if (strcmp("/autoraadio", cmdtext, true) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
SendClientMessage(playerid,COLOR_GREY,"Sa ei ole sхidukis!");
return 1;
}
new Float:X, Float:Y, Float:Z, Float:Distance = 5.0;
GetVehiclePos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls", X, Y, Z, Distance, 1);
return 1;
}
This is the car audio system put this dident work why?
This should work like this:
[ame]http://www.youtube.com/watch?v=EekoE5mtLDo&feature=player_embedded[/ame]
Re: CAR AUDIO -
thimo - 16.01.2012
pawn Код:
if (strcmp("/autoraadio", cmdtext, true) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 5.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls", X, Y, Z, Distance, 1);
return 1;
}
else
SendClientMessage(playerid, 0xFFFFFFFFFFF, "You gotta be in a vehicle to use this command!");
return 1;
}
And btw this only works when ur standing still u got change the poss everytime u move... So use a timer
Re: CAR AUDIO -
romka - 16.01.2012
Can you do it for me?
pleas
Re: CAR AUDIO -
thimo - 16.01.2012
Sure... If you dont wanna learn something:
pawn Код:
//Under the command:
SetTimer("ResetPosOfRadio", 1000, true);
//Somewhere top your script:
forward ResetPosOfRadio(playerid);
//Somewhere in ur script.
public ResetPosOfRadio(playerid)
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls", X, Y, Z, Distance, 1);
return 1;
}
Untested... If errors just show me the errors
Re: CAR AUDIO -
romka - 16.01.2012
and how i can start and stop the music?
Re: CAR AUDIO -
Sascha - 16.01.2012
pawn Код:
PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls", X, Y, Z, Distance, 0);
or simply use 0 as for "usepos", which will update it automatically..
Re: CAR AUDIO -
romka - 16.01.2012
C:\Documents and Settings\nuka\Desktop\samp_P\samp_P\Ravens_Rolepla y_0.3c\Raven's Roleplay 0.3c\gamemodes\lsrp.pwn(45095) : error 017: undefined symbol "X" this error:S
Re: CAR AUDIO -
Sascha - 16.01.2012
pawn Код:
PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls", 0.0, 0.0, 0.0, 0, 0);
Re: CAR AUDIO -
romka - 16.01.2012
its dosent work help please:S
Re: CAR AUDIO -
romka - 16.01.2012
help please!