Spawn few objects / max
#1

How can I make this system only spawn 5 giftboxes / 100 at one time.

PHP код:
function:OnLoadGiftboxes()
{
    new 
rows cache_num_rows();
    new 
iCount;
    if(
rows)
    {
        new 
iGet[128];
        for(new 
0rows!= li++)
        {
            
cache_get_field_content(i"gbox_x"iGet); Giftboxes[i][gbox_x] = floatstr(iGet);
            
cache_get_field_content(i"gbox_y"iGet); Giftboxes[i][gbox_y] = floatstr(iGet);
            
cache_get_field_content(i"gbox_z"iGet); Giftboxes[i][gbox_z] = floatstr(iGet);
            
Giftboxes[i][gbox_active]=false;
            
// ActivateGiftboxes(5); when I put here, all giftboxes spawned.
            
iCount++;
        }
    }
    
// ActivateGiftboxes(5); When I put here, it shows only 5 objects but spawned at 0,0,0, cords (blueberry).
    
printf("[Debug - Giftboxes] A total of %d/%d/%d giftboxes have been loaded from the database."iCountrowsMAX_GIFTBOXES);
    return 
1;

Reply


Messages In This Thread
Spawn few objects / max - by AzaMx - 12.08.2018, 01:08
Re: Spawn few objects / max - by AzaMx - 12.08.2018, 17:15
Re: Spawn few objects / max - by Bigwebicek - 12.08.2018, 18:01
Re: Spawn few objects / max - by TheBlackHand - 12.08.2018, 18:05
Re: Spawn few objects / max - by Pottus - 12.08.2018, 18:25
Re: Spawn few objects / max - by AzaMx - 12.08.2018, 18:59
Re: Spawn few objects / max - by AzaMx - 14.08.2018, 04:17

Forum Jump:


Users browsing this thread: 1 Guest(s)