Raised This Month: $12 Target: $400
 3% 

Menus


Post New Thread Reply   
 
Thread Tools Display Modes
MacL
Member
Join Date: May 2021
Old 07-04-2021 , 17:40   Re: Menus
Reply With Quote #11

Quote:
Originally Posted by Natsheh View Post
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.
it was in a russian site, i had it in my other windows. i think it has only amxx file. Please give an example if its possible.

Last edited by MacL; 07-04-2021 at 17:41.
MacL is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 07-04-2021 , 18:22   Re: Menus
Reply With Quote #12

!cmd_access( id, level, cid, 0 )
->
menu_access(id, level, cid)

Untested:
PHP Code:
native menu_access(idlevelcid)

public 
plugin_natives()
{
    
register_native("menu_access""_MenuAccess")
}
public 
_MenuAccess(iPluginiParams)
{
    if(!
cmd_accessget_param(1), get_param(2), get_param(3), ))
        
client_print(get_param(1), print_chat"You have no access to this command.");
}

//Another way:
public client_PreThink(islevelcid
{
        if(!
cmd_accessidlevelcid))
            
client_print(idprint_chat"You have no access to this command.");
    

__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 07-04-2021 at 19:29.
Supremache is offline
MacL
Member
Join Date: May 2021
Old 07-04-2021 , 19:09   Re: Menus
Reply With Quote #13

Read the goddamn post first.
MacL is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 07-04-2021 , 19:27   Re: Menus
Reply With Quote #14

Quote:
Originally Posted by MacL View Post
Read the goddamn post first.
Have you understood my code?!
First way for using new native access with automatic print chat
2th client_prethink if user doesn't have access will show automatic print chat
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 07-04-2021 at 19:30.
Supremache is offline
MacL
Member
Join Date: May 2021
Old 07-04-2021 , 19:41   Re: Menus
Reply With Quote #15

Quote:
Originally Posted by Supremache View Post
Have you understood my code?!
First way for using new native access with automatic print chat
2th client_prethink if user doesn't have access will show automatic print chat
Quote:
Originally Posted by MacL View Post
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
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 03:23.


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