[Ajuda] Problema spawnar objetos RANDOM
#1

O que estб errado neste code? o correto seria spawnar todos os objetos, mas spawna no mбximo 5.
Nгo estб apresentando nenhum erro de compilaзгo, porem nгo estб spawnando todos os objetos

No topo
PHP код:
#define MAX_LITTER                  (20) 
PHP код:
new LitterPlaced[MAX_LITTER];
new 
LitterObjects[9] = {283726702671267226732674267526762677};
[
b]Spawn[/b]
new 
Float:LitterSpawns[MAX_LITTER][3] = // -= 0.975
{
    
// MONTGOMERY
    
{1225.847534361.66253618.646},
    {
1236.861206358.27746518.646},
    {
1254.182495348.22854618.646},
    {
1260.515991347.99481218.646},
    {
1271.184204347.47222918.646},
    {
1270.432006358.40191618.646},
    {
1283.298095372.86492918.646},
    {
1286.481201385.21130318.646},
    {
1302.524169381.48056018.646},
    {
1315.692871376.58682218.646},
    {
1329.069946370.35748218.646},
    {
1334.440673371.28451518.646},
    {
1342.016479383.92102018.646},
    {
1346.587646396.52551218.646},
    {
1369.796752409.84774718.646},
    {
1365.009277391.82461518.646},
    {
1351.626708370.96148618.646},
    {
1341.249511349.47698918.646},
    {
1331.825927324.74566618.646},
    {
1316.262817330.53039518.646}

Code que faz spawnar - "ou pelo menos deveria"
PHP код:
    //Spawn lixos
    
if(gLitterCount MAX_LITTER)
    {
        new 
litter_idx random(sizeof(LitterSpawns));
        if(
LitterPlaced[litter_idx] > 0)
        {
            
litter_idx GetNextFreeLitterSpot();
        }
        if(
litter_idx != -1)
        {
            
LitterPlaced[litter_idx] = CreateDynamicObject(LitterObjects[random(sizeof(LitterObjects))], LitterSpawns[litter_idx][0], LitterSpawns[litter_idx][1], LitterSpawns[litter_idx][2], 0.00.0float(random(360)));
            
gLitterCount ++;
        }
    } 
Porque nгo estб spawnando os 20 objetos? o que hб de errado?
Reply


Messages In This Thread
Problema spawnar objetos RANDOM - by Revolts - 11.01.2018, 09:29
Re: Problema spawnar objetos RANDOM - by IlanZ - 11.01.2018, 14:56

Forum Jump:


Users browsing this thread: 2 Guest(s)