Menu Issues
Okay. I've had this problem for quite awhile now. No idea why, but my menu is way screwed up.
Everytime I go to the menu by typing "/ninjamenu" it automatically sets my class to "Strong", and the menu doesn't show. the second time I type it, it gives me the error that "I'm already a Strong Ninja, pick something else". And shows the menu, but I can't close it using the Exit button. Pretty sure that's just a chuunk of code I left out, but doesn't explain the above errors. Here's the menu code. Code:
Code:
|
Anyone?
If no one knows, does anyone know a similar way to do this, that works? |
change
Code:
new keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)Code:
new keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<9) |
That really wont do anything, it will just change the keys...
|
yes i know, i changed them so he can exit the menu
|
LOL! Duh.
Ok thanks man. But my main problem is the setting of the player class when they enter the menu. I also want it to pop up for players that first join. |
Code:
|
What's with the define? What does 854894894 do?
Thanks for code. |
Just defines it to some random number, so if some other function of another plugin uses remove_task() chances are it wont remove that task your plugin uses....
|
Actually you should use client_putinserver, not client_connect. client_connect is called when a player starts connecting to the server. client_putinserver is called when the user is actually in the game, meaning the user has fully connected, and not still connecting.
My point is use client_putinserver to make the menu pop-up when the player first joins in the game. That way you can also avoid setting a task as well. So your modified code would look like this: Code:
Makes life easier doesn't it? :wink: |
| All times are GMT -4. The time now is 23:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.