[menu]need help with custom menu
Greetings to all coders. I need help with some basic scripting.
I Have a plugin that has two console commands: - record POV demo of a player - makes a player take a snapshot. I would like to integrate them into an admin menu for example, if admin types in console : Quote:
Any help will be appreciated. |
Re: [menu]need help with custom menu
1) create new menu
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
Re: [menu]need help with custom menu
how do i call such menu from console?
And what functions should i declare : Code:
new snapmenu = menu_create("Snapshot player:","snap_handle") |
Re: [menu]need help with custom menu
here is example
PHP Code:
btw, use [php] instead of [code] tag |
Re: [menu]need help with custom menu
@SonicSonedit
- Use get_players instead(with alive flag) - You don't need to set the infos and get them, just use the item parameter what's automatically passed to the function - The admin acces isn't send, cause there isn't places for it in the first function, also you don't pass it to the second either(It's not even possible to, when displaying the menu) |
Re: [menu]need help with custom menu
thnx for helping me out.
i got 1 error during compilation: PHP Code:
This line: PHP Code:
Error: Number of arguments does not match definition where the problemmight be? |
Re: [menu]need help with custom menu
It's because num_to_str can't be used like that. Basically something like this:
Code:
new string[1]; |
Re: [menu]need help with custom menu
PHP Code:
2. Is return PLUGIN_HANDLED; required here? |
Re: [menu]need help with custom menu
It's because get_user_name can't be used like that. Basically something like this:
Code:
new name[33];Edit: Quote:
|
Re: [menu]need help with custom menu
SnoW
That was just an example, i use everything you said in ZP_CS_Buymenu limeassist yeah, forgot num_to_str works different in c++ and pawn. this one tested. PHP Code:
|
| All times are GMT -4. The time now is 08:54. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.