pickups giving lot of sounds
#1

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;

Reply
#2

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)