SA-MP Forums Archive
pickups giving lot of sounds - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: pickups giving lot of sounds (/showthread.php?tid=659224)



pickups giving lot of sounds - severance - 27.09.2018

Well i just made a weapon and health pickups and everything seem to work but , the pickup sound sometimes is not synced on the moment you taking the pickup, it seems like once you took it the sounds are looping or even before you taking them. Well that's just a lost case which i dont seem to understand what's causing it.

This is the drop pickups

PHP код:
function create_player_drops(playerid)
{
    new 
FloatxFloatyFloatzp_weaponp_ammogetspace;
    
    
GetPlayerPos(playeridxyz);
    
pickup_Health CreatePickup(12403xy+1z, -1);
    for (new 
012i++)
    {
        
GetPlayerWeaponData(playeridip_weaponp_ammo);
        
getspace++;
        
pickup_Weapon[i] = CreatePickup(WeaponObject(p_weapon), 3x+getspaceyz, -1);
    }
        
    
SetTimerEx("DestroyPlayerDrops"10000false"i"playerid);
        
    return 
1;

Even tho... i'm not using any sounds here

PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{
    new 
FloatHP;
    
    if(
pickupid == pickup_Weapon[playerid]) DestroyPickup(pickup_Weapon[playerid]);
       
    if(
pickupid == pickup_Health)
    {
         
GetPlayerHealth(playeridHP); 
         if(
HP 80SetPlayerHealth(playeridHP+20);
         
DestroyPickup(pickup_Health);
     }
        
    return 
1;




Re: pickups giving lot of sounds - v1k1nG - 27.09.2018

Check pickup types, you may need to use pickup type 1 for scripting purposes


Re: pickups giving lot of sounds - severance - 28.09.2018

Yeah i made type 1, but now pickup can't be taken