Pickup!!
#1

Guys I need some help.Here is what i m thinking to create pickup with array.

pawn Код:
new pickup[20];
pawn Код:
OnGameModeInit()
{
pickup[0]= CreatePcikup...
...pickup[19]...
return 1;
}
So what i use in OnPlayerPickUpPickedUp so that i wont have to make like this

pawn Код:
if(pickupid == pickup[0])
{
}
then
if(pickupid == pickup[1])
What should i use??Something like that?

pawn Код:
public OnPlayerPickupPickedUp(playerid, pickupid)
{
for(new i=0;i<=19;i++)
{
if(pickupid == a[i])
{
//Stuffs here because i am using same function for every pickup
}
return 1;
}
Reply


Messages In This Thread
Pickup!! - by Gamer_007 - 13.05.2013, 11:55
AW: Pickup!! - by HurtLocker - 13.05.2013, 11:57
Re: Pickup!! - by Gamer_007 - 13.05.2013, 12:20
Re: Pickup!! - by Calabresi - 13.05.2013, 12:32
Re: Pickup!! - by Gamer_007 - 13.05.2013, 12:34

Forum Jump:


Users browsing this thread: 1 Guest(s)