Items Database In Array ( Add,Remove Items )
Hi...
Lets start! Here is my code: PHP Code:
This code is for example registering weapons, items, forwards, entities and everythings else. Problem is, i feel that, there must be better method for doing this... You see g_item_count get every times bigger and bigger if i for example add item... If i remove item i can just do this: g_item_count-- and if i do, item index-s inside of g_itemid can have same values what also mean if i remove item again with that index then wrong item will be removed : / ( because of my gameplay, one map can last 1 - 3 hours, so that g_item_count can get very huge value and i think thats bad for cpu. ) Also can i somehow make this without loop ( loop in g_remove_item for searching right index... ) Thanks! |
Re: Items Database In Array ( Add,Remove Items )
It really depends on how you intend on removing the items. For example if you were to remove them by menu then it could be done differently, as oppose to eg. picking a random item id.
|
| All times are GMT -4. The time now is 10:52. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.