Raised This Month: $ Target: $400
 0% 

HELP!! #define macros value with 2D arrays player data


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
lexzor
Veteran Member
Join Date: Nov 2020
Old 09-11-2022 , 09:55   Re: HELP!! #define macros value with 2D arrays player data
Reply With Quote #8

yes, the ninth slot of the arrray is reserved for P_SHOWICONS

PHP Code:
CS_GetIconid )
{
new 
szInfo[32];
get_user_infoid"_wc3"szInfo31 );

if ( 
strlenszInfo ) > && str_to_numszInfo ) > )
{
p_data[id][P_SHOWICONS] = true; -> tag mismatch warning
}
else
{
p_data[id][P_SHOWICONS] = false; -> tag mismatch warning

that code just detect if player has a icon (idk what icon because you don t provide source) and store the data in that variable with slot 9 (defined as P_SHOWICONS to not memorize the numbers, using words is more easy). there should be a mismatch warning when you compile the code because before giving a variable a boolean value you must define it as a boolean variable

PHP Code:
WC3_ResetOnNewSessionid )
{
// Shadow Hunter's Serpent Wards
p_data[id][P_SERPENTCOUNT] = 0
i think P_SERPENTCOUNT just count something called "wards" (obviously ) ) and that function just reset them when a new round start.

Last edited by lexzor; 09-11-2022 at 09:57.
lexzor 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 15:35.


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