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

Rules Menu w/ Accept or Deny


Post New Thread Reply   
 
Thread Tools Display Modes
derptestt
Senior Member
Join Date: Jul 2015
Old 08-13-2015 , 18:06   Re: Rules Menu w/ Accept or Deny
Reply With Quote #11

I think I have one problem figured out. THe KZTimer pops up with its own menu onclientadmincheck (at least I think so), so I just need to make the timer longer.

I put this function in show rules:
SetMenuExitButton(rules, false);

But it still shows the Exit Button.
derptestt is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 08-13-2015 , 18:11   Re: Rules Menu w/ Accept or Deny
Reply With Quote #12

make sure youjre putting it before displaymenu
Miu is offline
derptestt
Senior Member
Join Date: Jul 2015
Old 08-13-2015 , 20:39   Re: Rules Menu w/ Accept or Deny
Reply With Quote #13

Everything works fine except for the fact that the KZTimer menu is completely overriding the menu when the player joins. I looked in the kztimer source code, and the 2 commands are:

PHP Code:
StopClimbersMenu(client)
ClimbersMenu(client
The problem is, those aren't in the kztimer.inc, so I can't just write #include kztimer. Is there a way to still use those functions within a plugin?

EDIT: Also the console command: sm_menu is the defined command to open up the menu. I just don't know how to close it.
EDIT 2: Nvm, doesn't even matter.

Last edited by derptestt; 08-13-2015 at 21:15.
derptestt is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 08-14-2015 , 06:21   Re: Rules Menu w/ Accept or Deny
Reply With Quote #14

you could make natives for them
Miu is offline
derptestt
Senior Member
Join Date: Jul 2015
Old 08-14-2015 , 12:00   Re: Rules Menu w/ Accept or Deny
Reply With Quote #15

I couldn't figure out how. I read the wiki on it, but the way the kztimer.inc file is constructed confused me.

For example:
PHP Code:
native KZTimer_StopTimer(client); // stops the timer 
I know this line of code works, but I seriously ctrl+F'ed through all 10 bajillion lines of KZTimer, and couldn't find anything that resembled this function call.

Either way, not that big of deal. I decided that a rules popup menu would be too annoying b/c then it'd pop up on every map change.

Quote:
Originally Posted by Miu View Post
you could make natives for them
derptestt is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 08-14-2015 , 12:03   Re: Rules Menu w/ Accept or Deny
Reply With Quote #16

well, I'm guessing the other plugins that do this save something in order stop showing it once the user has accepted
Miu is offline
TheUnderTaker
Senior Member
Join Date: Dec 2013
Location: Israel
Old 08-14-2015 , 13:26   Re: Rules Menu w/ Accept or Deny
Reply With Quote #17

Instead natives and more things, You can modify your KZTimer and call it KZTimer and Rules however you want, Put your rules code into KZTimer core and do If he deny; Get kick, If he accept;Get menu of KZTimer.
__________________
SourcePawn, C# and C++ Programmer.

My plugin list
TheUnderTaker is offline
derptestt
Senior Member
Join Date: Jul 2015
Old 08-19-2015 , 05:04   Re: Rules Menu w/ Accept or Deny
Reply With Quote #18

How would I implement cookies into this to say, if client accepts rules, it doesn't show for 12 more hours? Also, would it be possible to say, everyone with at least flag "a" or "b" or w/e doesn't have to see the menu?
derptestt is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 08-19-2015 , 12:25   Re: Rules Menu w/ Accept or Deny
Reply With Quote #19

For the former, use an array (or two) of length MAXPLAYERS and/or SQL.

For the latter, use CheckCommandAccess to check if a player has a flag.
Potato Uno is offline
asdfxD
Veteran Member
Join Date: Apr 2011
Old 12-29-2020 , 19:07   Re: Rules Menu w/ Accept or Deny
Reply With Quote #20

the script works fine but there is one problem, closing the menu does not kick. possible to change this? Deny = kick, close menu = kick.

edit: solved, above => SetMenuExitButton(rules, false);

Last edited by asdfxD; 12-29-2020 at 19:31.
asdfxD 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 07:06.


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