English Lua Scripts/Questions/Help

6,770 replies
Goto Page
To the start Previous 1 2 ... 296 297 298 ... 338 339 Next To the start
30.10.10 06:37:00 pm
Up
Admir
User
Offline Off
loooser has written:
try
Code:
1
2
3
4
addhook("spawn","spawn")
function spawn(id)
parse('hudtxt2 '..id..' 0 "©000000000 CT: '..game("winrow_ct")..' T:  '..game("winrow_t")..'" 3 100 0') 
end


hmm, that why we learn to scripting instead use other people scripts. should be liek this.

Code:
1
parse('hudtxt2 '..id..' 1 "©000000000 CT: '..game("score_ct")..' T:  '..game("score_t")..'" 3 100 0')
My curse will sail against the wind and enrage the earth.
30.10.10 06:39:47 pm
Up
Loooser
User
Offline Off
@ admir should be winrow_ct not score that what the info.txt sais

ops ok your right just didnt see it
IMG:http://i45.tinypic.com/saus1e.jpg
30.10.10 06:40:35 pm
Up
kNedLiik
User
Offline Off
any of this don't work for me
IMG:http://i52.tinypic.com/14nk75z.png
IMG:http://img263.imageshack.us/img263/3100/userbar828775.gif
30.10.10 06:41:41 pm
Up
Loooser
User
Offline Off
what sais the consol?
IMG:http://i45.tinypic.com/saus1e.jpg
30.10.10 06:43:12 pm
Up
kNedLiik
User
Offline Off
now work that was only cause admirs one wans't in code block and I didn't saw it thx guys free cookies for you cookies
IMG:http://i52.tinypic.com/14nk75z.png
IMG:http://img263.imageshack.us/img263/3100/userbar828775.gif
30.10.10 06:44:46 pm
Up
Kurumi
User
Offline Off
plz script that automaticaly joins t or ct team
Uhm... Hello
30.10.10 06:48:00 pm
Up
Loooser
User
Offline Off
i acctualy wanted a answer for my question but ok
try this
Code:
1
2
3
4
addhook("join","join")
function join(id)
parse("makect "..id)
end
IMG:http://i45.tinypic.com/saus1e.jpg
30.10.10 06:49:38 pm
Up
kNedLiik
User
Offline Off
How can I make it bigger.
IMG:http://i52.tinypic.com/14nk75z.png
IMG:http://img263.imageshack.us/img263/3100/userbar828775.gif
30.10.10 06:52:25 pm
Up
Loooser
User
Offline Off
you cant make the text bigger (i think)
IMG:http://i45.tinypic.com/saus1e.jpg
30.10.10 09:00:17 pm
Up
CappaCappa
BANNED
Offline Off
loooser has written:
@ knedliik what do you mean with a seeable score?
@kato999 yes example:
Code:
1
2
3
4
5
6
addhook("say","say")
function say(id,message)
if (message=="hi") then
parse("trigger triggername")
end
end

@steam-cs2d
try this
Code:
1
2
3
4
5
6
addhook("say, player_say")
function player_say(id, t)
if (t==!TeleAdmin) then 
parse("setpos "..id.." "..x.." "..y.."")
end
end


how do i know which id to use for removing a sertan image?(freeimage(id))


the id that is returned by image("path",x,y,mode,[pl])
30.10.10 11:26:07 pm
Up
archmage
User
Offline Off
I created this to check parameters.
More >


Examples:
Code:
1
2
3
4
5
6
-- This is how it should be used when defining a function

function foo(...)     check_param("foo", {"number", "string", "table"}, {...});
     argv = {...};
     print(argv[1], argv[2], argv[3][0]);
end


Code:
1
2
3
4
5
6
-- Calls to foo
foo(0x32, "a string", {[0]=10})     -- prints: 50 a string 10

foo(12, "string", 10)     -- ERROR! parameter types do not match

foo(0,0)     -- ERROR! incorrect parameter count
We must secure the existence of our people and a future for white children. 14/88
31.10.10 01:55:09 am
Up
Tai Lung
User
Offline Off
Can someone just give me a simple script on always giving the starting money of 16000 each round? and also, where to put it plz, im new at lua.

~thanks
31.10.10 03:51:29 am
Up
The Camo
User
Offline Off
Tai Lung has written:
Can someone just give me a simple script on always giving the starting money of 16000 each round? and also, where to put it plz, im new at lua.

~thanks


Spawning player will get cash.
Code:
1
2
3
4
addhook("spawn","cashatstart")
function cashatstart(id)
parse("setmoney "..id.." 16000")
end


Place it ... in whatever .lua file you want (thats hooked with server.lua). Place in any line, everything is the same...

P.S. If you didn't want this... and meaning about round money... you can change it in your settings..
31.10.10 05:34:40 am
Up
archmage
User
Offline Off
What is the mask for an image when I use image()?
We must secure the existence of our people and a future for white children. 14/88
31.10.10 07:35:41 am
Up
Caelenn
User
Offline Off
What's the script then i can't buy granades on a server?
IMG:http://img233.imageshack.us/img233/4059/buttonvrf.jpg
31.10.10 08:29:35 am
Up
Loooser
User
Offline Off
@darkbyte
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
image("path",x,y,mode,[pl])    Creates an image (dynamic object) on the map and returns the ID.
                          Mode 0: floor image (covered by players etc)
                          Mode 1: top image (covering players)
                          Mode 2: HUD image (covering everything, part of the interface)
                          Mode 3: super top image (covering everything on the map)
                          Mode 101-132: draw under this player (id+100)
                          Mode 201-232: draw over this player (id+200)
                          Mode 133-164: draw over this player and over entities (id+132)
                          When drawing at player, x and y are used this way:     
                          x<=0: do not rotate with player, x>0: rotate img with player
                          y<=0: only draw if not covered by fog of war, y>0: draw always
                          [pl] is an optional parameter. 0 (default value) means that
                          all players see this image. If you set it to a player ID then
                          only this player will see this image!
                          The command returns the ID of the dynamic object image!


you can see it in the info.txt file

@Nelight try this

Code:
1
2
3
4
5
6
addhook("buy","buy")
function buy(id,weapon)
if (weapon==51) then
return 1
end
end
IMG:http://i45.tinypic.com/saus1e.jpg
31.10.10 08:30:58 am
Up
Flacko
User
Offline Off
Dark Byte has written:
What is the mask for an image when I use image()?

I think it depends on the blending mode. By default I think uses R0 G0 B0 (not magic pink)
31.10.10 08:33:16 am
Up
Rainoth
Moderator
Offline Off
Really simple no need for script.
just Enter parameter in your script
mp_unbuyable or something like that then list unbuyable things.
31.10.10 09:01:57 am
Up
Caelenn
User
Offline Off
Can you give my an example?
IMG:http://img233.imageshack.us/img233/4059/buttonvrf.jpg
31.10.10 09:19:37 am
Up
Kurumi
User
Offline Off
is there a script that makes function table like in tibia (buy leather boots etc)
Uhm... Hello
To the start Previous 1 2 ... 296 297 298 ... 338 339 Next To the start