Problem with audio plugin v0.5 -
Komx - 19.09.2011
Hi, I have one problem with audio plugin by Incognito V0.5.
I have a problem with handleid, exactly the output and input. I use the whole is a portable radio, the so-called boombox. The whole is based on the items. When we mark the item I create a 3D position for the radio and fires through the loop for all players, then write handleid in enum. When you pick up item from downloading handleid enum, but here there is trouble. when I put item handleid writes well, but when lifting is always 0, though this should be enrolled in an enum that when put on the ground! This is the code:
When I put item:
PHP код:
forward OnGamerDropItem (playerid, iuid);
public OnGamerDropItem (playerid, iuid)
{
new itemid = GetItemID (iuid);
/ / other code
if (ItemInfo [itemid] [iWhat] == I_BOOMBOX)
{
foreach (i, MAX_PLAYERS)
{
ItemInfo [itemid] [iValue] = Audio_PlayStreamed (i, "Address URL");
Audio_Set3DPosition (i, ItemInfo [itemid] [iValue], posx, posy, posz, 20);
}
}
}
As you can see in the enum handleid ItemInfo write.
Here is the code when you pick up item:
PHP код:
forward WhenGamerPickupItem (playerid, iuid);
public WhenGamerPickupItem (playerid, iuid)
{
new itemid = GetItemID (iuid);
foreach (i, MAX_PLAYERS)
{
Audio_Remove3DPosition (i, ItemInfo [itemid] [iValue]);
Audio_Stop (i, ItemInfo [itemid] [iValue]);
}
}
Well, I do not remove item 3d and the music does not cease to play. Any suggestions?
Re: Problem with audio plugin v0.5 -
TheArcher - 19.09.2011
SA:MP 0.3d offers already to set an audio in 3D poistion. why using Audio Plugin? You also need the client installed.
Re: Problem with audio plugin v0.5 -
Komx - 19.09.2011
I must use audio plugin v0.5, why it make me problems? Look at my example, why it don't work?
I have audio plugin nygga.
Re: Problem with audio plugin v0.5 -
Komx - 19.09.2011
What could be wrong, that handleid not want to move in an enum, or bugged in the way that saves me and when handleid I want to delete this item 3d enum returns 0?
Re: Problem with audio plugin v0.5 -
Komx - 21.09.2011
Hello!?
Re: Problem with audio plugin v0.5 -
Ensconce - 21.09.2011
Where are you getting
posx, posy, posz from?
Re: Problem with audio plugin v0.5 -
TheArcher - 21.09.2011
@Ensconce Indeed.
If you want to get the 3D sound in the current player position you have to use GetPlayer(playerid, Float

, Float:y, Float:z) paramter.
Re: Problem with audio plugin v0.5 -
Komx - 21.09.2011
I am downloading the player positions in the code above, everything is as it should. Why handleid after saving the enum, and later reading is 0 and which ones should not?
Re: Problem with audio plugin v0.5 -
TheArcher - 21.09.2011
First of all try to do
then the
the paramter should be.
pawn Код:
PlayAudioStreamForPlayer(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0);
Re: Problem with audio plugin v0.5 -
Komx - 23.09.2011
I use audio plugin v0.5, not SA-MP 0.3d!
By the way, how to stop the 0.3d handleid in samp? To turn off a playback for the player - the playback.