Func_Message (script).
6 replies



05.06.12 12:57:27 pm
Hello
.
I have one idea for a script in map editor.
Ok we have Func_Message.
So my idea is when you write in the ''msg rectangle''
[username] is the best!
The message is going to look like:
''The user that is reading this'' is the best!
When i'm reading this it will be like:
Misho is the best!
I hope you get my point.
And one question is it possible?

I have one idea for a script in map editor.
Ok we have Func_Message.
So my idea is when you write in the ''msg rectangle''
[username] is the best!
The message is going to look like:
''The user that is reading this'' is the best!
When i'm reading this it will be like:
Misho is the best!
I hope you get my point.
And one question is it possible?
There is an idea thread (
Ideas for Counter-Strike 2D 0.1.2.1). Please use it to post your ideas instead of creating new threads.
What you want to do is already possible with simple Lua scripts so I'll not implement it for the func_message entity.


What you want to do is already possible with simple Lua scripts so I'll not implement it for the func_message entity.
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
function vDisplay(text)
pTable = player(0,"table");
for i=1,#pTable do
msg2(player(pTable[i],"name").." "..text);
end
end
addhook ("trigger","vTrigger");
function vTrigger(x,y)
if (entity(x,y,"typename")=="func_message") then
vDisplay(entity(x,y,"str0"));
end
end
pTable = player(0,"table");
for i=1,#pTable do
msg2(player(pTable[i],"name").." "..text);
end
end
addhook ("trigger","vTrigger");
function vTrigger(x,y)
if (entity(x,y,"typename")=="func_message") then
vDisplay(entity(x,y,"str0"));
end
end
Muh



