Raised This Month: $ Target: $400
 0% 

hud error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tm.
Member
Join Date: Apr 2010
Old 06-17-2010 , 05:07   Re: hud error
Reply With Quote #1

Actually it's not correct. Try this:
PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin("Pirkti menu""1.0""omgitsme")
    
register_logevent("roundstart"2"0=World triggered""1=Round_Start")
        
register_clcmd"say /pirkti","Pirkti");
}

public 
roundstart()
{
    
set_hudmessage(2552550, -1.0, -1.006.05.0)
    
show_hudmessage(0"Rasyk /pirkti jei nori vip/admin privelgu!")
}

public 
Pirkti(id)
{
    new 
menu menu_create("\rServer paslaugos:""menu_handler");
    
menu_additem(menu"\wAdmin + Vip""1"0);
    
menu_additem(menu"\wAdmin""2"0);
    
menu_additem(menu"\wVip""3"0);
    
menu_additem(menu"\wSlot""4"0);
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
    
}

public 
menu_handler(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);
    new 
key str_to_num(data);
    switch(
key)
    {
        case 
1:
        {
            
show_motd(id"admin.txt");
            
menu_destroy(menu);
            return 
PLUGIN_HANDLED;
        }
        case 
2:
        {
            
show_motd(id"uzas.txt");
        }
        case 
3:
        {
            
show_motd(id"vip.txt");
        }
        case 
4:
        {
            
show_motd(id"slot.txt");
        }
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;

tm. is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 06-17-2010 , 06:34   Re: hud error
Reply With Quote #2

Quote:
Originally Posted by tm. View Post
Actually it's not correct. Try this:
PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin("Pirkti menu""1.0""omgitsme")
    
register_logevent("roundstart"2"0=World triggered""1=Round_Start")
        
register_clcmd"say /pirkti","Pirkti");
}

public 
roundstart()
{
    
set_hudmessage(2552550, -1.0, -1.006.05.0)
    
show_hudmessage(0"Rasyk /pirkti jei nori vip/admin privelgu!")
}

public 
Pirkti(id)
{
    new 
menu menu_create("\rServer paslaugos:""menu_handler");
    
menu_additem(menu"\wAdmin + Vip""1"0);
    
menu_additem(menu"\wAdmin""2"0);
    
menu_additem(menu"\wVip""3"0);
    
menu_additem(menu"\wSlot""4"0);
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
    
}

public 
menu_handler(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);
    new 
key str_to_num(data);
    switch(
key)
    {
        case 
1:
        {
            
show_motd(id"admin.txt");
            
menu_destroy(menu);
            return 
PLUGIN_HANDLED;
        }
        case 
2:
        {
            
show_motd(id"uzas.txt");
        }
        case 
3:
        {
            
show_motd(id"vip.txt");
        }
        case 
4:
        {
            
show_motd(id"slot.txt");
        }
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;

I was actually referring to the third post in this topic.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
tm.
Member
Join Date: Apr 2010
Old 06-17-2010 , 08:14   Re: hud error
Reply With Quote #3

Quote:
Originally Posted by GXLZPGX View Post
I was actually referring to the third post in this topic.
Me too.
tm. is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 06-17-2010 , 19:38   Re: hud error
Reply With Quote #4

Quote:
Originally Posted by tm. View Post
Me too.
If you were, then my code was perfectly fine. All he had in the third post was:

PHP Code:
#include <amxmodx>

set_hudmessage(2552550, -1.0, -1.006.05.0)
show_hudmessage(id"Rasyk /pirkti jei nori vip/admin privelgu!")

 public 
plugin_init()
 {
     
register_plugin("Pirkti menu""1.0""omgitsme")
         
register_clcmd"say /pirkti","Pirkti");
 } 
Mine carried out the function and displays a hud message when you type /pirkti.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
Reply



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 14:49.


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