12.01.2012, 10:57
Instead of putting it into an array which wouldn't work in the first place, just make a stock function.
pawn Код:
#define MAX_RANDOM_GIFTS 3 //The amount of random gifts you have
stock RandomGift(playerid)
{
new randomgift = random(MAX_RANDOM_GIFTS) + 1;
switch (randomgift)
{
case 1:
{
//Do something
}
case 2:
{
//Do something 2
}
case 3:
{
//Do something 3
}
}
return 1;
}