Raised This Month: $32 Target: $400
 8% 

Menus


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MacL
Member
Join Date: May 2021
Old 06-02-2021 , 06:30   Menus
Reply With Quote #1

hey alliedmodders, How to hook all the menus on the server? For example, when we use the following code in the plugin, if the user does not have access, it will be automatically printed that
Spoiler
Code
PHP Code:
 if( !cmd_accessidlevelcid) )
{
          return 
PLUGIN_HANDLED;

Now I want to make a change like this in the menus. For example, if the user selected exits or Back option Back in the menus Song number 1 will play for him/her . And if he/she selected any option other than Exit and Back in menus song number 2 will play for him/her.
I mean do this for all server plugins that use "Menu" (without editing them) . do i need make a new plugin for this or edit inc files? how ?
thanks.

Last edited by MacL; 06-11-2021 at 08:07.
MacL is offline
MacL
Member
Join Date: May 2021
Old 06-11-2021 , 08:07   Re: Menus
Reply With Quote #2

Bump
MacL is offline
MacL
Member
Join Date: May 2021
Old 06-30-2021 , 09:11   Re: Menus
Reply With Quote #3

Bump
MacL is offline
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 06-30-2021 , 12:19   Re: Menus
Reply With Quote #4

There is no need to use this function for player testing

Code:
    if ( cs_get_user_team( client ) != CS_TEAM_CT ) // CT / T
    {
        client_print(client, print_chat, "Error: You have no access to this command.");
        return 1;
    }
I used to use it and it worked great:

EDIT
Quote:
This is a for a team, if you're talking about access get_user_flags

Last edited by Fuck For Fun; 06-30-2021 at 12:20.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
MacL
Member
Join Date: May 2021
Old 06-30-2021 , 13:46   Re: Menus
Reply With Quote #5

Quote:
Originally Posted by Fuck For Fun View Post
There is no need to use this function for player testing

Code:
    if ( cs_get_user_team( client ) != CS_TEAM_CT ) // CT / T
    {
        client_print(client, print_chat, "Error: You have no access to this command.");
        return 1;
    }
I used to use it and it worked great:

EDIT
what does it have to do with? did you read my request?
MacL is offline
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 07-03-2021 , 11:43   Re: Menus
Reply With Quote #6

Quote:
Originally Posted by MacL View Post
what does it have to do with? did you read my request?
Are you trying to play with the BACK and EXIT buttons that will work for you on something in particular?

Old Menu that calling:>
Code:
    if(0 < page)
    {
        iLen += formatex(szMenu[iLen], charsmax(szMenu), "^n\r8. \wBack^n")
        iKeys |= MENU_KEY_8;
    }
    else iLen += formatex(szMenu[iLen], charsmax(szMenu), "^n\d8. Back^n")
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
MacL
Member
Join Date: May 2021
Old 07-03-2021 , 12:17   Re: Menus
Reply With Quote #7

Quote:
Originally Posted by Fuck For Fun View Post
Are you trying to play with the BACK and EXIT buttons that will work for you on something in particular?

Old Menu that calling:>
Code:
    if(0 < page)
    {
        iLen += formatex(szMenu[iLen], charsmax(szMenu), "^n\r8. \wBack^n")
        iKeys |= MENU_KEY_8;
    }
    else iLen += formatex(szMenu[iLen], charsmax(szMenu), "^n\d8. Back^n")
what i'm trying to do is :
Imagine a player opening a menu in the game. He can choose between 1 and 9 or exit / back option.
Well, if the player chooses an option other than exit / back, song number 1 should be played for him. Otherwise (chooses Back option), song number 2 played for him. Now this should happen for all plugins in the server that use the menu. (Without editing them, just by creating a plugin)
MacL is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-03-2021 , 13:06   Re: Menus
Reply With Quote #8

not possible without editing the plugins one by one..
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
MacL
Member
Join Date: May 2021
Old 07-04-2021 , 16:08   Re: Menus
Reply With Quote #9

Quote:
Originally Posted by Natsheh View Post
not possible without editing the plugins one by one..
it possible. already saw.
MacL is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-04-2021 , 16:34   Re: Menus
Reply With Quote #10

Quote:
Originally Posted by MacL View Post
it possible. already saw.
Well attach a proof then if you already saw that.

Tbh it is possible but the only method that i could think of is through player frame think hook which is a bad idea.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 07-04-2021 at 16:52.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 02:32.


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