SA-MP Forums Archive
a question regarding global pickups - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: a question regarding global pickups (/showthread.php?tid=659209)



a question regarding global pickups - severance - 27.09.2018

I'm making a kind of simple hp pickup when a player dies and the first one who takes it gets +20 health, so in this case i should call the variable with

PHP код:
new hp_pickup[MAX_PICKUPS]; 
or what? because i'm not sure if i should use this or simple this
PHP код:
new hp_pickup
it doesn't really explain on wiki (https://sampwiki.blast.hk/wiki/CreatePickup)


Re: a question regarding global pickups - solstice_ - 27.09.2018

https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup
No? this explains it pretty clean.


Re: a question regarding global pickups - severance - 27.09.2018

Quote:
Originally Posted by willbedie
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup
No? this explains it pretty clean.
No you don't get me, i already got the knowledge on making pickups but why is there MAX_PICKUPS? what does it do, example my server has 30 players, will it be good if store the pickup id on
PHP код:
new hp_pickup
instead of
PHP код:
new hp_pickup[MAX_PLAYERS] or [MAX_PICKUPS
what's the difference between using it and not using it


Re: a question regarding global pickups - solstice_ - 27.09.2018

I've never used pickups before, but I think MAX_PICKUPS does the same like others, for example MAX_PLAYERS

MAX_PICKUPS - Whatever you define this, it will be the maximum pickups you can have
MAX_PLAYERS - For example you define this to 100, your maximum players slot is 100.

I guess you can understand me.


Re: a question regarding global pickups - severance - 27.09.2018

Alright , thank you