19.09.2011, 15:43
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:
As you can see in the enum handleid ItemInfo write.
Here is the code when you pick up item:
Well, I do not remove item 3d and the music does not cease to play. Any suggestions?
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);
}
}
}
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]);
}
}