Forum

> > CS2D > Scripts > Lua Scripts/Questions/Help
Forums overviewCS2D overview Scripts overviewLog in to reply

English Lua Scripts/Questions/Help

6,770 replies
Page
To the start Previous 1 2226 227 228338 339 Next To the start

old Re: Lua Scripts/Questions/Help

Rainoth
Moderator Off Offline

Quote
Another question...

Is it possible to script such a lua.

E.g. You are dead
You say !revive,!revival etc...
And you spawn in your spawn point...
And lose 8000$

old Re: Lua Scripts/Questions/Help

Snake_Eater
User Off Offline

Quote
@ Schinken

the script don't work

1
2
3
4
5
6
7
8
9
10
11
addhook ("say","sages")
function sages(id,txt)
local tox=txt:sub(txt,0,10)
if tox=="!broadcast" then
local fullstring = txt:sub(10,txt:len)

msg ("©000255255"..player(id,"name").."(broadcasts):"..fullstring)
return 1;
end
end
end

old Re: Lua Scripts/Questions/Help

Rainoth
Moderator Off Offline

Quote
another very BIG problem. I have pacman.lua and server.lua in my sys folder
The lua is set to default (server.lua)
In there is written :
dofile("sys/lua/pacman.dat")

But nothing happens ! When i start server there are no luas added !

How am i going to live without lua's !

old Re: Lua Scripts/Questions/Help

Lee
Moderator Off Offline

Quote
1
2
3
4
5
6
7
8
9
addhook ("say","sages")
function sages(id,txt)
	local tox=txt:sub(1,10)
	if tox=="!broadcast" then
		local fullstring = txt:sub(12)
		msg("©000255255"..player(id,"name").."(broadcasts): "..fullstring)
		return 1;
	end
end

@bat:
If you're going to import pacman.lua, don't suddenly change your mind and import pacman.dat

1
dofile("sys/lua/pacman.lua")

old Re: Lua Scripts/Questions/Help

Rainoth
Moderator Off Offline

Quote
Omg THANKS ! But what about revival idea ? Is it posible ?
I have such problem...
1
2
3
4
5
6
7
8
9
10
11
addhook("move","barbiredwire")
function barbiredwire(id,x,y)
ix = player(id,"tilex")
iy = player(id,"tiley")
it = player(id,"team")
     if (barbiredwireman[id]==1)then
          parse("spawnobject 2 "..ix.." "..iy.." 0 0 "..it.." "..id)
     elseif (barbiredwireman[id]==0)then
          return 0
     end
end

LUA ERROR : sys/lua/pacman.dat :37: attempt to index global 'barbiredwireman' (a number value)

old Re: Lua Scripts/Questions/Help

Admir
User Off Offline

Quote
Snake_Eater has written
Hi all
I need a script if somebody say something that the text doesn't show up in chat

sry for bad english


1
2
3
4
5
6
addhook("say","noshow")
function noshow(id,txt)
	if (txt == "you noob") then
		return 1 -- This is will not show the text (you noob)
	end
end

old Re: Lua Scripts/Questions/Help

RyceR
User Off Offline

Quote
I need a script like this:

if i say !pm "ID" "MSG" there is message for only 1 player and for me: message send / bad player ID

old Re: Lua Scripts/Questions/Help

Admir
User Off Offline

Quote
Snake_Eater has written
It doesn't work


100% work for me , for example that 'you noob'.
you need type it correctly! no capital letters, must have space like in txt.

old Re: Lua Scripts/Questions/Help

Snake_Eater
User Off Offline

Quote
I know but

•I want that the text does not show up if I say something and not only "you noob"

@Msek
I have written a script like this but the text "!pm......."
shows up in chat!

So if my question answered i can show you the complete script

old Re: Lua Scripts/Questions/Help

Admir
User Off Offline

Quote
Snake_Eater has written
I know but

•I want that the text does not show up if I say something and not only "you noob"


Just change 'you noob' to any words

old Re: Lua Scripts/Questions/Help

Snake_Eater
User Off Offline

Quote
@ MSeK

This is what you need,but you have to write it so

>!pm 01 Hi√ right
>!pm 1 Hi× wrong

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
addhook ("say","sages2")
function sages2(id,txt)
if string.find(txt,"!pm") then
local to4=txt:sub(5,6)
msg2 (id,"©000255000You have sent a pm to "..player(to4,"name").."!")
return 1;
end
end 

addhook ("say","sages")
function sages(id,txt)
     local to1=txt:sub(1,3)
     local to2=txt:sub(5,6)
     local to3=txt:sub(8)
     if to1=="!pm" then
      msg2 (to2,"©000255255"..player(id,"name").."(pm): "..to3)
     end
end

old Re: Lua Scripts/Questions/Help

TimeQuesT
User Off Offline

Quote
i saw that someone search a whisper bzw a pm script.
i made one weeks ago. to use it press "f2" then there will be a menu where you can select 4 whisper pages.
you can open the menu with writing "-whisper" ,too.

page1 -- id 1- 9
page2 -- id 10-18
page3 -- id 19-27
page4 -- id 28-32
all players will be stand in this menus as button....
select one and write someting.the written will be sended to the selected player



--cut of here--
More >

old Admin Msg

Slayer
User Off Offline

Quote
Can anyone make like some other servers has like this

name(owner):

I want it to can anyone make it for admins and owners?



Here is a infmoney w/ Save make a folder at the selecting Gfx and stuff like that make a folder name:User

Spoiler >


Alex_aaa made it so hope you like pls. replace the at there to 6) tnx!
edited 2×, last 28.07.10 04:52:25 pm

old closed Re: Lua Scripts/Questions/Help

244453211332112
User Off Offline

Quote
Ja sorry ich konnte des ned löschen wollte eig. was fragen...
edited 2×, last 28.07.10 07:13:45 pm

Admin/mod comment

Wrong language + spam. /TheKilledDeath

old Script

shelter97
User Off Offline

Quote
Someone could make a script noclip and a script that could go up to the position of someone player and bringing it to you? And also a script to hold a player, in which only the admin can use this "command"

old Re: Lua Scripts/Questions/Help

The Camo
User Off Offline

Quote
Um, I'm new in scripting, and I need to know something,

I know I can add color in the first line in this:

1
msg ([[[["©000000255"]]]].."1".."2")

But can I add another color here too:

1
msg ([[[["©000000255"]]]].."1"..[[[["©000255000"]]]].."2")

Or is there any other way to do it? (because when i do like in second code it shows text: 1"©000255000"2 )

old Re: Lua Scripts/Questions/Help

CmDark
User Off Offline

Quote
wow where did all the new imports come from

I'm working on a project nicknamed "cmmod"
I need some suggestions anyone?
Can't really think of anything to add to my mod..

@slayer
1
2
3
4
5
6
7
addhook('say','saymod')
admtable={usgnid}
function saymod(p, t)
if admtable[player(p,'usgn')] then
msg('©000150000'..player(p,'name')..' (Admin): '..t)
end
end

you do the rest
To the start Previous 1 2226 227 228338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview