AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   i Need Help ZP Missions Reward Menu (https://forums.alliedmods.net/showthread.php?t=306988)

LuXoAlinFCSB 04-21-2018 20:24

i Need Help ZP Missions Reward Menu
 
Hello my friends, I designed it in a good way and I do not face it or the first thing, which is wrong. After that, I faced some problems and I can not fix it. If you are accused of it and you want help please if anyone knows how to fix it.

Missions Reward Menu Sma Code:
PHP Code:

#include <amxmodx>

#include <amxmisc>

#include <cstrike>

#include <zombieplague>

//#include <chat> // ZP 50  

#include <colorchat>



#define PLUGIN "[LU] Helpers Plugins Missions Reward Menu"

#define VERSION "3.0"

#define AUTHOR "LuXo KING Gaming"



//AUTHOR Full LuXo KING Gaming



enum _:_STRUCT_LOGROS LOGRO_NAME90 ], LOGRO_INFO90 ], LOGRO_REQUIREDLOGRO_REWARD };

enum _:_FRAGS_LOGROS CT};



new const 
g_iszCLogros[ ][ _STRUCT_LOGROS ] = 

{

//NOMBRE DE LOGRO                        / FRAGS / GANANCIA

"My First Blood""Kill 50 Zombie"505000 },

"Human Apprentice""Kill 500 Zombie"50010000 },

"Umbrella""Kill 5000 Zombie"500015000 },

"Last Man Standing""Kill 10000 Zombie"1000025000 }

};



new const 
g_iszTLogros[ ][ _STRUCT_LOGROS ] = 

{

"My First Slaughter""It infects 50 Humans"50,5000 },

"Zombie Apprentice""It infects 500 Humans"50050000 },

"I Will Destroy""It infects 5000 Humans"5000100000 },

"Dominating Our World!""It infects 10000 Humans"10000150000 }

}; 

new 
g_frags33 ][ _FRAGS_LOGROS ];

new 
g_szText500 ]; 

new 
g_ammopacks[33// ammo pack count



public plugin_init() {

register_plugin(PLUGINVERSIONAUTHOR)



register_plugin("New Missions Reward Menu""3.0""LuXo KING Gaming");

register_clcmd("say reward""Menu_de_Opciones");

register_clcmd("say /reward""Menu_de_Opciones");



}

public 
Menu_de_Opciones(id) {

new 
hMenu menu_create("\r[LU] \yMore options""modifhand_h")



menu_additem(hMenu"\yMissions" "1")



menu_display(idhMenu0)

}





public 
modifhand_h(idmenuitemindex) {

if ( 
item == MENU_EXIT ) {

menu_destroy(menu)

return 
PLUGIN_HANDLED;

}

switch(
item) {

case 
0: {
    
    
clcmd_logros(id)
    
}



}

return 
PLUGIN_HANDLED;

}



public 
clcmd_logrosid )

{

new 
Team get_user_teamid );



switch( 
Team )

{

case 
CS_TEAM_CTLogrosHumanosid );
    
    case 
CS_TEAM_TLogrosZombiesid );
        
    }
    
    return 
PLUGIN_HANDLED;
    
}



public 
LogrosHumanosid )
    
{

new 
iMenu menu_create"Seeing Human Achievements""Handler_LogrosC" );



for( new 
num 0num sizeofg_iszCLogros ); num++ )
    
{
    
    
formatexg_szTextcharsmaxg_szText ), ( g_fragsid ][ CT ] >= g_iszCLogrosnum ][ LOGRO_REQUIRED ] ) ? "%s \y[ \wCOMPLETADO \y]":"%s",
    
    
g_iszCLogrosnum ][ LOGRO_NAME ], g_iszCLogrosnum ][ LOGRO_NAME ] );
    
    
    
    
menu_additemiMenug_szText__menu_makecallback"get_LogroC" ) );
    
}

menu_displayidiMenu);

}



public 
LogrosZombiesid )

{

new 
iMenu menu_create"Seeing Zombie Achievements""Handler_LogrosT" );



for( new 
num 0num sizeofg_iszTLogros ); num++ )
    
{
    
    
formatexg_szTextcharsmaxg_szText ), ( g_fragsid ][ ] >= g_iszTLogrosnum ][ LOGRO_REQUIRED ] ) ? "%s \y[ \wCOMPLETADO \y]":"%s",
    
    
g_iszTLogrosnum ][ LOGRO_NAME ], g_iszTLogrosnum ][ LOGRO_NAME ] );
    
    
    
    
menu_additemiMenug_szText__menu_makecallback"get_LogroT" ) );
    
}

menu_displayidiMenu);

}



public 
Handler_LogrosTid iMenuiItem )

{

formatexg_szTextcharsmaxg_szText ), "\yAchievement: \w%s^n\yInfo: \w%s^n^n\yInfected Humans: \w%d\r/\w%d^n^n\rAmmo Packs Reward: \y%d"

g_iszTLogrosiItem ][ LOGRO_NAME ], g_iszTLogrosiItem ][ LOGRO_INFO ], g_fragsid ][ ], g_iszTLogrosiItem ][ LOGRO_REQUIRED ],

g_iszTLogrosiItem ][ LOGRO_REWARD ] );



new 
iMenu menu_createg_szText"LogrosInfo" );



menu_additemiMenu"EXIT" );

menu_setpropiMenuMPROP_EXITMEXIT_NEVER );

menu_displayidiMenu);

}





public 
Handler_LogrosCid iMenuiItem )

{

formatexg_szTextcharsmaxg_szText ), "\yAchievement: \w%s^n\yInfo: \w%s^n^n\yZombie Killed: \w%d\r/\w%d^n^n\rAmmo Packs Reward: \y%d"

g_iszCLogrosiItem ][ LOGRO_NAME ], g_iszCLogrosiItem ][ LOGRO_INFO ], g_fragsid][ CT ], g_iszCLogrosiItem ][ LOGRO_REQUIRED ],

g_iszCLogrosiItem ][ LOGRO_REWARD ] );



new 
iMenu menu_createg_szText"LogrosInfo" );



menu_additemiMenu"EXIT" );

menu_setpropiMenuMPROP_EXITMEXIT_NEVER );

menu_displayidiMenu);

}



public 
LogrosInfoidiMenuiItem menu_destroyiMenu );



public 
get_LogroCidiMenuiItem ) return g_fragsid ][ CT ] >= g_iszCLogrosiItem ][ LOGRO_REQUIRED ] ? ITEM_DISABLED ITEM_ENABLED;



public 
get_LogroTidiMenuiItem ) return g_fragsid ][ ] >= g_iszTLogrosiItem ][ LOGRO_REQUIRED ] ? ITEM_DISABLED ITEM_ENABLED;





public 
get_logroid )

{

new 
Teams get_user_teamid );



switch( 
Teams )
    
{
    
    case 
CS_TEAM_CT:
        
    {
        
        for( new 
0sizeofg_iszCLogros ); n++ )
            
        {
            
            if( 
g_fragsid ][ CT ] == g_iszCLogros][ LOGRO_REQUIRED ] )
                
            {
                
                
ColorChatidGREEN"^x04[LU]^x01 Completed achievement:^x03 %s^x01. Won^x04 %d^x01 Ammo Packs "g_iszCLogros][ LOGRO_NAME ], g_iszCLogros][ LOGRO_REWARD ] );
                
                
g_ammopacksid] += g_iszCLogros][ LOGRO_REWARD ];
                
                
                
            }
            
        }
        
    }
    
    case 
CS_TEAM_T:
        
    {
        
        for( new 
num 0num sizeofg_iszTLogros ); num++ )
            
        {
            
            if( 
g_fragsid ][ ] == g_iszTLogrosnum ][ LOGRO_REQUIRED ] )
                
            {
                
                
ColorChatidGREEN,"^x04[LU]^x01 Completed achievement:^x03 %s^x01. Won^x04 %d^x01 Ammo Packs "g_iszTLogrosnum ][ LOGRO_NAME ], g_iszTLogrosnum ][ LOGRO_REWARD ] );
                
                
g_ammopacksid ] += g_iszTLogrosnum ][ LOGRO_REWARD ];
                
                
                
            }
            
        }
        
    }
    
}





All times are GMT -4. The time now is 04:35.

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