Raised This Month: $ Target: $400
 0% 

menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 01-09-2013 , 12:39   menu
Reply With Quote #1

I want to see the percent of all players on the server but it doesnt work
exemple this line shows me how many percent i got
and it works great
Code:
Terroist Surviver </td><td> %i / %i  </td><td> %d%% </td></tr>", iAchLevel[i][SURVIVE],  iAchPoints[SURVIVE], 100 * iAchLevel[i][SURVIVE] /  iAchPoints[SURVIVE]);
But this line dont shows me players percent
when i open the meny it shows that i got 0% and evry body else got random percent LOL
Code:
new szMenuKey[128];
for( new i; i < iNum; i++ )
    {
        iPlayer = iPlayers[i];
        new percent = 100 * iAchLevel[i][i]/iAchPoints[i]
        get_user_name(iPlayer, szName, charsmax(szName));
        format(szMenuKey,127,"%s%s \d[%d%%]^n",(id==iPlayer)?"\r":"",szName,percent);
        num_to_str(iPlayer, szKey, charsmax(szKey));
        menu_additem(iMenu, szMenuKey, szKey);
but if i change the code to
Code:
new szMenuKey[128];
for( new i; i < iNum; i++ )
    {
        iPlayer = iPlayers[i];
        new percent = 100 * iAchLevel[id][i]/iAchPoints[i]
        get_user_name(iPlayer, szName, charsmax(szName));
        format(szMenuKey,127,"%s%s \d[%d%%]^n",(id==iPlayer)?"\r":"",szName,percent);
        num_to_str(iPlayer, szKey, charsmax(szKey));
        menu_additem(iMenu, szMenuKey, szKey);
the percent only works for guys that open the meny

and here is the array
Code:
new iAchLevel[MaxPlayers][iAchCount]
and here is a other iAchLevel line in the plugin
Code:
iAchLevel[id][JUMP]++
How can i fix so it shows evryones stats including my own in the menu?
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
 



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 13:43.


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