Items spawn on same coords
#10

Quote:
Originally Posted by Joe Staff
Посмотреть сообщение
pawn Код:
forward LootRespawn();
public LootRespawn()
{
        new Items, amount;
    for(new i=0; i<MAX_ITEMS; i++)
    {
        DeleteAllItems(i);
     Items = random(sizeof(ItemSpawns));
    amount = randomEx(1, 10);
        if(ItemSpawns[Items][0] == 333 || ItemSpawns[Items][0] == 334 || ItemSpawns[Items][0] == 335 || ItemSpawns[Items][0] == 336 || ItemSpawns[Items][0] == 337 || ItemSpawns[Items][0] == 338 || ItemSpawns[Items][0] == 339 ||
        ItemSpawns[Items][0] == 346 || ItemSpawns[Items][0] == 348 || ItemSpawns[Items][0] == 349 || ItemSpawns[Items][0] == 351 || ItemSpawns[Items][0] == 353 || ItemSpawns[Items][0] == 356 || ItemSpawns[Items][0] == 357 ||
        ItemSpawns[Items][0] == 338) amount = 1;
        CreateItem(ItemSpawns[Items][0], amount, ItemSpawns[Items][1], 377.64130, 2542.36963, 15.53980, 0, 0);
        CreateItem(ItemSpawns[Items][0], amount, ItemSpawns[Items][1], 381.50552, 2542.74146, 15.53976, 0, 0);
        CreateItem(ItemSpawns[Items][0], amount, ItemSpawns[Items][1], 381.19205, 2539.23486, 15.54050, 0, 0);
        CreateItem(ItemSpawns[Items][0], amount, ItemSpawns[Items][1], 378.27368, 2539.07715, 15.54048, 0, 0);
        LoadItemVisual(i);
    }
    return 1;
}
I did this before you posted this and I had no luck (I think anyways, I've lost track of how many things I've been doing to make this work :/)

pawn Код:
forward LootRespawn();
public LootRespawn()
{
    new amount = randomEx(1, 5);
    for(new i=0; i<MAX_ITEMS; i++)
    {
        DeleteAllItems(i);
    }
    for(new i=0; i<sizeof(ItemSpawns); i++)
    {
        for(new j=0; j<sizeof(RandomItems); j++)
        {
            CreateItem(RandomItems[j][0], amount, RandomItems[j][1], ItemSpawns[i][0], ItemSpawns[i][1], ItemSpawns[i][2], 0, 1);
        }
    }
    for(new i=0; i<MAX_ITEMS; i++)
    {
        LoadItemVisual(i);
    }
    return 1;
}
I've been trying to try this one, but when I try to connect to localhost, I get this.
Код:
[connection] 127.0.0.1:63958 request connection cookie.
Kicking 127.0.0.1 because they didn't logon to the game.
Before you ask, I am 100% sure this piece of code is what's causing this issue as I can connect to the server fine when I comment this code out of the script, but I have no clue what's wrong with this as I have something that's does the same type of thing but doesn't pose an issue.
pawn Код:
//The code for reference

forward UpdateHouseData();
public UpdateHouseData()
{
    foreach(Player, i)
    {
        for(new j = 0; j<MAX_HOUSES; j++)
        {
            if(fexist(HousePath(i)))
            {
                if(IsPlayerInRangeOfPoint(i, 1, House[j][ExtPosX], House[j][ExtPosY], House[j][ExtPosZ]))
                {
                    ShowHouseInfo(i, j, 2000);
                }
            }
        }
    }
    return 1;
}

EDIT: nvm, this doesn't work.
Reply


Messages In This Thread
Items spawn on same coords - by DTV - 10.05.2015, 02:57
Re: Items spawn on same coords - by RoboN1X - 10.05.2015, 04:04
Re: Items spawn on same coords - by DTV - 10.05.2015, 05:00
Re: Items spawn on same coords - by RoboN1X - 10.05.2015, 07:09
Re: Items spawn on same coords - by DTV - 10.05.2015, 12:22
Re: Items spawn on same coords - by DTV - 10.05.2015, 20:53
Re: Items spawn on same coords - by DTV - 12.05.2015, 02:24
Re: Items spawn on same coords - by Joe Staff - 12.05.2015, 03:19
Re: Items spawn on same coords - by Joe Staff - 12.05.2015, 04:12
Re: Items spawn on same coords - by DTV - 12.05.2015, 06:18

Forum Jump:


Users browsing this thread: 2 Guest(s)