Raised This Month: $ Target: $400
 0% 

[HELP] Server crashing on MENU command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
malec321
Senior Member
Join Date: May 2009
Location: Los Angeles
Old 06-28-2009 , 14:15   [HELP] Server crashing on MENU command
Reply With Quote #1

Grr this is pissing me off. Can anyone explain why everytime i type /xp the server crashes and the menu doesnt show.


PHP Code:
public cmdPmenuid )
{
if ( ( 
is_user_alive id ) ) && ( get_pcvar_num pCvarEnabled ) ) )
{
set_task1.0"Pmenu" )
}
else if ( !
is_user_alive id ) )
{
client_print idprint_chat"%s You are dead"PREFIX )
}
else
{
client_print idprint_chat"%s Plugin is disabled"PREFIX )
}
}

public 
Pmenuid )
{
new 
menu menu_create "/rHide N Seek XP""P_Menu" )

menu_additem menu"\rGrenade \yMenu \r(Terrorist)""1")
menu_additem menu"\rHealth \yMenu""2")
menu_additem menu"\rArmor \yMenu" "3")
menu_additem menu"\rShop \yMenu""4")
menu_additem menu"\rBuy \yXP""5")
menu_additem menu"\rRevive - \y50 points""6")

menu_setprop menuMPROP_EXITMEXIT_NEVER );
menu_display (idmenu
malec321 is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 06-28-2009 , 14:27   Re: [HELP] Server crashing on MENU command
Reply With Quote #2

Whole file please

Also give us the error...

This will work too

PHP Code:
if ( is_user_alive id ) && get_pcvar_num pCvarEnabled ) ) 
For the rest looks everything normal to me...
__________________

Last edited by crazyeffect; 06-28-2009 at 14:31.
crazyeffect is offline
Send a message via MSN to crazyeffect
malec321
Senior Member
Join Date: May 2009
Location: Los Angeles
Old 06-28-2009 , 14:59   Re: [HELP] Server crashing on MENU command
Reply With Quote #3

Its just the MAIN menu all the other functions work of the plugin like /myxp
malec321 is offline
malec321
Senior Member
Join Date: May 2009
Location: Los Angeles
Old 06-28-2009 , 15:01   Re: [HELP] Server crashing on MENU command
Reply With Quote #4

set_task( 1.0, "Pmenu" )

doesnt it have to be

set_task( 1.0, "P_menu" )
malec321 is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 06-28-2009 , 15:17   Re: [HELP] Server crashing on MENU command
Reply With Quote #5

Code:
set_task( 1.0, "Pmenu", id )

That way it would only open it on the person who says it instead of everyone at once (I think, anyway, I suck at scripting).
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-28-2009 , 16:03   Re: [HELP] Server crashing on MENU command
Reply With Quote #6

Don't use a task. Just call the function.

PHP Code:
Pmenu(id
__________________
fysiks is offline
Reply


Thread Tools
Display Modes

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 15:26.


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