Raised This Month: $ Target: $400
 0% 

enum question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SKAtZ.
Member
Join Date: May 2016
Old 05-28-2016 , 00:59   enum question
Reply With Quote #1

Im trying to make a loop to create a menu list of my Items Shop, the code below is a example how I made it, and Im trying to make an option if the user already have that item doesn't show the price, but if they didnt have that item the price appears, but I don't know the correct way to do it.

If someone could help me that would be great!

Spoiler

Last edited by SKAtZ.; 05-28-2016 at 01:05.
SKAtZ. is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 05-28-2016 , 14:04   Re: enum question
Reply With Quote #2

I think what you want to do is change this:
Code:
new I: iItemsUser[MAX_PLAYERS+1][ITEM];
to this:
Code:
new I: g_ItemsUser[MAX_PLAYERS+1];
and use
Code:
if ( g_ItemsUser[id] & I:(1<<i) )
__________________

Last edited by Black Rose; 05-28-2016 at 14:45.
Black Rose is offline
SKAtZ.
Member
Join Date: May 2016
Old 05-31-2016 , 23:29   Re: enum question
Reply With Quote #3

Quote:
Originally Posted by Black Rose View Post
I think what you want to do is change this:
Code:
new I: iItemsUser[MAX_PLAYERS+1][ITEM];
to this:
Code:
new I: g_ItemsUser[MAX_PLAYERS+1];
and use
Code:
if ( g_ItemsUser[id] & I:(1<<i) )
Yeah, it makes sense! Thank you
SKAtZ. is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode