Raised This Month: $ Target: $400
 0% 

Show description when menu item is pressed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Airkish
AlliedModders Donor
Join Date: Apr 2016
Location: Lithuania
Old 03-19-2017 , 19:16   Show description when menu item is pressed
Reply With Quote #1

Need to make that when menu key is pressed it would show description of that achievement

PHP Code:
public CmdAch(iPlayer

    new 
g_AchMenu menu_create("\wPasiekimai""Achievements_Handler"
     
    new 
Key[6
     
    for(new 
iAch 0iAch AchievesiAch++) 
    { 
        if(
Achievement[iPlayer][iAch] == 0formatex(szTempcharsmax(szTemp), "\d%s - [%d/%d]"AchName[iAch], Achievement[iPlayer][iAch], AchRequirement[iAch]) 
        else if(
Achievement[iPlayer][iAch] >= AchRequirement[iAch]) formatex(szTempcharsmax(szTemp), "\y%s \w- [\rĮVYKDYTAS\w]"AchName[iAch]) 
        else 
formatex(szTempcharsmax(szTemp), "\y%s \w- [\r%d\w/\r%d\w]"AchName[iAch], Achievement[iPlayer][iAch], AchRequirement[iAch]) 
        
menu_additem(g_AchMenuszTempKey
    } 
     
    
menu_setprop(g_AchMenuMPROP_EXITMEXIT_ALL
    
menu_display(iPlayerg_AchMenu0


public 
Achievements_Handler(iPlayerg_AchMenuitem)  
{  
    if(
item == MENU_EXIT)  
    {  
        
menu_destroy(g_AchMenu
        return 
PLUGIN_HANDLED  
    

    else 
    { 
        if(
Achievement[iPlayer][item] >= AchRequirement[item])  
        {  
            
ColorChat(iPlayerRED"Completed."
            
CmdAch(iPlayer);  
        }  
        else  
        {  
            
ColorChat(iPlayerRED"%s"AchDescription[iPlayer]) 
                       
CmdAch(iPlayer);  
        }  
    }  
    return 
PLUGIN_CONTINUE  

__________________
Airkish 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 18:05.


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