Problem with audio plugin v0.5
#1

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 (playeridiuid);
public 
OnGamerDropItem (playeridiuid)
{
new 
itemid GetItemID (iuid);
       / / 
other code
    
if (ItemInfo [itemid] [iWhat] == I_BOOMBOX)
{
            foreach (
iMAX_PLAYERS)
{
ItemInfo [itemid] [iValue] = Audio_PlayStreamed (i"Address URL");
Audio_Set3DPosition (iItemInfo [itemid] [iValue], posxposyposz20);
           }
    }
  } 
As you can see in the enum handleid ItemInfo write.
Here is the code when you pick up item:
PHP код:
forward WhenGamerPickupItem (playeridiuid);
public 
WhenGamerPickupItem (playeridiuid)
{
new 
itemid GetItemID (iuid);
   foreach (
iMAX_PLAYERS)
   {
    
Audio_Remove3DPosition (iItemInfo [itemid] [iValue]);
Audio_Stop (iItemInfo [itemid] [iValue]);
  }

Well, I do not remove item 3d and the music does not cease to play. Any suggestions?
Reply
#2

SA:MP 0.3d offers already to set an audio in 3D poistion. why using Audio Plugin? You also need the client installed.
Reply
#3

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

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?
Reply
#5

Hello!?
Reply
#6

Where are you getting posx, posy, posz from?
Reply
#7

@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.
Reply
#8

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?
Reply
#9

First of all try to do
pawn Код:
foreach(i, Player)
then the
pawn Код:
Audio_PlayStreamed
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);
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)