Annoying pickup-problem!
#1

'Sup y'all!

Since a longer time, I got this problem now! I've created a script which creates Deathpickups with money when a player dies, and first, it worked very well at all! It's supposed to give the player random money between $10 and $100 when he picks up one of these random cash-pickups! BUT, since 2 or 3 weeks, I just tested it again, and all of the pickups which are getting created are working well! Only always ONE of them gives me suddenly about 100k! :O

I don't know what I added last, and I also removed any filterscript I've got at the moment! Here is my full code, I hope someone is able to help me!^^

PHP код:
   #define DEATH_PICKUPS 10
    
new DeathPickupsMAX_PLAYERS ][ DEATH_PICKUPS ],
    
bool:DeathPickupsCreatedMAX_PLAYERS ]; 
PHP код:
public OnPlayerDeath(playeridkilleridreason)
    {
    
        if(
DeathPickupsCreated[playerid] == true)
        {
            for(new 
aDEATH_PICKUPSa++)
            {
                
DestroyPickup(DeathPickups[playerid][a]);
            }
            
            
DeathPickupsCreated[playerid] = false;
        }
        
        new 
Float:P[3];
        
GetPlayerPos(playeridP[0], P[1], P[2] );
        
        for(new 
aDEATH_PICKUPSa++)
        {
            
DeathPickups[playerid][a] = CreatePickup(12123P[0] + random) - random), P] + random) - random), P] - 0.5 , -);
            
DeathPickupsCreated[playerid] = true;
        }
//the rest of the callback 
PHP код:
    public OnPlayerPickUpPickup(playeridpickupid)
    {
        for(new 
aMAX_PLAYERSa++)
        {
            for(new 
bDEATH_PICKUPSb++)
            {
                if(
pickupid == DeathPickups[a][b])
                {
                    
GivePlayerMoney(playeridrandom (100));
                    
                    
DestroyPickup(pickupid);
                }
            }
        }
    
    
        return 
1;
    } 
Reply
#2

Does anyone know what the problem could be?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)