Raised This Month: $ Target: $400
 0% 

playermenu help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 10-05-2011 , 15:30   Re: playermenu help
Reply With Quote #6

Creating a global variable that holds the index of the selected player is also a valid option.

Code:
new g_playerid[ 33 ]; // in menu_handler // instead of new tempid = str_to_num(data): g_playerid[ id ] = str_to_num( data ); // then use g_playerid[ id ] to retrieve the selected player index // get_user_name(g_playerid[ id ], name, charsmax( name ) ); // etc... // and then in submenu_handler // use the global variable to retrieve the index new key = str_to_num( data ); set_user_ammo( g_playerid[ id ], g_ammoAmount[ key ] ); // just an example, set_user_ammo does not exist as an amxx native
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
 



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 19:36.


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