Forum

> > CS2D > Scripts > Script will only work on a local server
Forums overviewCS2D overview Scripts overviewLog in to reply

English Script will only work on a local server

5 replies
To the start Previous 1 Next To the start

old Script will only work on a local server

Hajt
User Off Offline

Quote
script
1
2
3
4
5
6
7
8
function server.standard.say(id,txt)
	for _, usgn in ipairs(server.standard.admins) do
		if (player(id,'usgn')==usgn) then
			msg(string.char(169).."000255000"..player(id,"name").." [admin]: "..string.char(169).."255220000"..txt)
			return 1
		end
	end
end

local server
IMG:https://cs2d.xaa.pl/images/screens/test1.png


dedicated server
IMG:https://cs2d.xaa.pl/images/screens/test2.png

old Re: Script will only work on a local server

Fehu
User Off Offline

Quote
What is wrong with PL people? Teh fck.. lol
I can't understand you.. Nobody can..

//Ah I didn't saw screenshots. But.. Still I can't help you. Maybe you used another SAY HOOK without return?

old Re: Script will only work on a local server

Gajos
BANNED Off Offline

Quote
It's an error in the script. I have never had such a problem.
Stop copy and edit scripts.

PS. Na unlimited construction moge wam napisac lua.

EDIT:
On the picture local server we can't see hudtxt2's text.
edited 3×, last 30.12.13 10:12:31 pm

old Re: Script will only work on a local server

Avo
User Off Offline

Quote
The answer is simple. There are two functions hooked to hook "say". Read about priorities.
Quote
Priority is only important if there is more than one function attachted to the same hook!
Default is 0, higher numbers = higher priority, lower numbers (also negative) = lower priority.
The attached function with the HIGHEST priority is the LAST function which will be executed.
Moreover CS2D will take the return value of this function (if there is any)!
In most cases you will just omit the priority parameter (yes, it is [optional])!

addhook("say", "server.standard.say", 9999)

Btw, do you use my script from cartel's server?
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview