AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   MOTD help (https://forums.alliedmods.net/showthread.php?t=11118)

Bugsy 03-09-2005 23:15

MOTD help
 
Is it possible to show a user a motd and have the script wait until the user has clicked ok\close before proceding with the script?

Heres what I want to do: I have my C-D moderator plugin working and I wanted to add something so when they return to the server without C-D it will show them a motd explaining why they cant play without C-D and also provide a link to download C-D. I tried to use the kick command after the motd command but it doesn't show the motd, it only kicks. I know the motd is working because if I comment the kick command the motd shows. I need it to pause at the show_motd and as soon as it closes proceed with the kick.

nightscreem 03-10-2005 18:02

just download the say_motd plugin peoples say /motd

v3x 03-10-2005 18:06

Quote:

Originally Posted by nightscreem
just download the say_motd plugin peoples say /motd

Please read and fully understand the question before posting :nono:.
---

You could show the MOTD window, set a task to kick after X amount of seconds.. If that's what you're talking about.

KaOs 03-10-2005 19:44

Ya I really don't think there's a way to do this.. The most reasonable thing I can think of would be to make it show the MOTD, and then detect any movement or commands from the user (that could only occure when the MOTD is closed) at which point they would be kicked

twistedeuphoria 03-10-2005 19:57

client_PreThink + get_user_button + IN_CANCEL might work.

v3x 03-10-2005 19:58

The MOTD has an OK button, not Cancel :P.

Or does it work the same way?

twistedeuphoria 03-10-2005 20:00

lol, did u try it though? I assume it does, do you have a button bound to +cancel? :P

v3x 03-10-2005 20:07

So try..

Code:
client_PreThink(id) {     if(get_user_button(id) & IN_CANCEL) {         // ..     } }
:?:

Bugsy 03-10-2005 20:32

What does prethink do? jw

twistedeuphoria 03-10-2005 20:39

Code:
new inmotd[33] = 0 public motd_cmd(id) {     //blah blah     //blah blah     //show motd     inmotd[id] = 1 } public client_PreThink(id) {     new but = get_user_button(id)     new obut = get_user_oldbutton(id)     if((but & IN_CANCEL) && !(obut & IN_CANCEL) && (inmotd[id] == 1))     {         inmotd[id] = 0         //put stuff to be done after motd here     } }

That should work.


All times are GMT -4. The time now is 13:57.

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