I need help with my loot system.
#3

Quote:
Originally Posted by CuervO
Посмотреть сообщение
You can use a loop.
Voila, a loop within a loop also works, too, where 'i' are the players and 'a' are the different drops.
Thanks! +rep

If I store all the drop-able objects in an enum, how do I make the number go up on each drop?
Like, onplayerdeath, if player has a gascan, creates an object labeled ditems[playerid][gascan]+1;

Like how do I keep from overwriting the variable of the last one dropped?

edit:

I think I'm going to do it like this.
Код:
Onplayerdeath(playeridblahblah)
{
if(gascan[playerid] > 1)
{
if(isvaliddynamicobject(gasdrop[playerid])
{
new drop = gasdrop[playerid]+1;
drop=createdynamicobject(blahblah);
}
}
}
Reply


Messages In This Thread
I need help with my loot system. - by Unfriendly - 08.02.2014, 23:43
Re: I need help with my loot system. - by CuervO - 09.02.2014, 03:26
Re: I need help with my loot system. - by Unfriendly - 10.02.2014, 14:45

Forum Jump:


Users browsing this thread: 1 Guest(s)