Author Topic: My rules script doesn't work on dedicated servers.  (Read 1061 times)

So, I made this rules script since people are constantly being banned without being able to see the rules on the spawn logo (didn't download textures), and it works fine on single player, LAN, and Internet servers that aren't dedicated. Unfortunately, it doesn't work on any kind of dedicated server. When I try to type /rules on my dedicated server, the console prints:

Code: [Select]
Add-Ons/Script_SF574Rules/server.cs (0): Unable to find function ClientCmdMessageBoxOK
Here's the script I used:

Code: [Select]
function ServerCmdRules(%client)
{
clientCmdMessageBoxOK("Sonicfan574's Freebuild - Rules","Hi, welcome to Sonicfan574's Freebuild.
To keep the server peaceful and under control, please follow these rules.\n 1. Do not ask for admin if I do not
or barely know you, this will result in an immediate permaban.\n 2. Do not be an annoying handicap (ex.
spamming the chat, obscuring the builds or objects of others, etc).\n 3. Do not whine to me in IRC about any
bans or you will be banned longer.\n 4. Do not direspect other players.\n 5. If you have to build off of a
baseplate, make sure there is a use for it or it will be destroyed.\n 6. Do not abuse/spam events.\n 7. Have fun!\n
 As a side note, I will not let people record YouTube videos here unless they are a server regular and have the
permission of everyone in the server who will be shown.");
}

I'd use a rules script from the Add-Ons section, but unfortunately no working ones exist (anymore).

clientCmdMessageBoxOK("Sonicfan574's
commandToClient(%client, 'MessageBoxOK', "Sonicfan574's

The one you made up there would only work for yourself.

commandToClient(%client, 'MessageBoxOK', "Sonicfan574's
I tried that, but the text cuts off too early.

I tried that, but the text cuts off too early.
Dammit, just use GRules.

I tried that, but the text cuts off too early.

You can't send more than 255 characters.


Dammit, just use GRules.
I'd use a rules script from the Add-Ons section, but unfortunately no working ones exist (anymore).

You can't send more than 255 characters.
stuff...

Double toast: other players on my server can't use it, even if it's non-dedicated.

Double toast: other players on my server can't use it, even if it's non-dedicated.
Yeah. Whenever they call the rules function, it triggers your clientcmdmessageboxok, not theirs. It is not possible to do it this way at all.

Bump.

I'd use a rules script from the Add-Ons section, but unfortunately no working ones exist (anymore).



It does work, try something before you say "IT DOESNT WORK!!!! OMG HELP ME!!!!"

It does work, try something before you say "IT DOESNT WORK!!!! OMG HELP ME!!!!"
The download links are broken, hence the reason I pointed out there are no more rules scripts available.
Hurr loving durr.
« Last Edit: October 25, 2009, 06:51:23 PM by Sonicfan574 »

Locked, Kalphiter made something similar that works.