Quote:
Originally Posted by Altecaho
Code:
menu_additem(menu, "\w+50hp and +100 armor", "1", 0);
menu_additem(menu, "\wAdrenalinas", "2", 0);
menu_additem(menu, "\wUSP", "3", 0);
menu_additem(menu, "\w300 armor", "4", 0);
|
"Give HP (+%s HP)", "1" here must show
"amx_give_hp", "50"
Cause if i create menu with:
PHP Code:
menu_additem(menu, "\w+50hp and +100 armor", "1", 0);
and all the time i must edit CVar and menu text...
I try:
PHP Code:
new g_Hp;
public plugin_init ( ) {
g_Hp = register_cvar( "amx_give_hp", "50" );
}
new szHp[ 33 ];
get_pcvar_string( g_Hp, szHp, 32 );
menu_additem( menu, "Give HP (+%s HP)", "1", 0, szHp );
And got error: argument type nismatch <argument 5>