Raised This Month: $ Target: $400
 0% 

Server crash on command


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
reinert
Veteran Member
Join Date: Feb 2007
Old 05-11-2010 , 12:01   Re: Server crash on command
Reply With Quote #7

how can i add it to CS ? Before I added ShopMenu and ShopMenuHandler and all shop buying methods, it worked fine for me.

I changed something:

PHP Code:
public ShopMenu(id) {
    if (
PlayerCon[id]) {
        new 
menu menu_create("0""ShopMenuHandler")
        
menu_additem(menu"1""2"0)
        
menu_additem(menu"2""3",0)
        
menu_additem(menu"3""4",0)
        
menu_additem(menu"4""5",0)
        
menu_additem(menu"5""6",0)

        
menu_setprop(menuMPROP_EXITMEXIT_ALL)
        
menu_display(idmenu0)
        }else{
        
client_print(idprint_chat,"!g[User Shop]!y Tik registruoti zaidejai gali naudotis menu.")
    }
    return 
PLUGIN_HANDLED
}

public 
ShopMenuHandler(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: {
        }
        case 
2: {
            if (!
PlayerDamage[id]){
            }else{
        }
        }
        case 
3:  {
            if (!
PlayerAwp[id]){
            }else{
        }
        }
        case 
4:  {
            if (!
PlayerPap[id]){
            }else{
        }
        }
        case 
5: {
            if (!
PlayerKar[id]){
            }else{
        }
        }
        case 
6: {
            if (!
PlayerSlot[id]){
            }else{
        }
        }
    }
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED

and now server doesn't crash, so where is the problem ?

Last edited by reinert; 05-11-2010 at 12:11.
reinert 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 03:42.


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