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 2303 304 305338 339 Next To the start

old Re: Lua Scripts/Questions/Help

TDShuft
User Off Offline

Quote
BureX has written
wawawa can somebody help me with this script ? i wanted to make that when a player changes his gun that he doesnt change gun :S ( i think i said it correctly) like player has usp and he changes it to a knife BUT lua changes it back again to usp

uhhh but you know it will only for for terrorists ... right
if you dont want only for Ts then remove If player ..
and an end
1
2
3
4
5
6
addhook("select","**CENSURED**")
function **CENSURED**(id,type,mode)
if player(id,"team") == 1 then
parse("setweapon "..id.." "..player(id,"weapontype"))
end
end

try it ..

old Re: Lua Scripts/Questions/Help

brk951753
User Off Offline

Quote
how i can show image on screen??

(i have one image and i want show on screen (image: gfx/asd.png))
edited 1×, last 09.11.10 09:44:06 pm

old Re: Lua Scripts/Questions/Help

Anders4000
User Off Offline

Quote
Joaopcvcastro has written
Please, what im doing worng? can someone help?
1
2
3
4
addhook("startround","starting")
     function starting(mode)
          parse("trigger ENTITY_NAME")
end
I want to every roundstart it will trigger a entity on the map, on ENTITY_NAME i put the name of the entity that i want to trigger and it still dont works, please i need help


I think that you can make a Start Entity on the map that can trigger the Entity. You don't have to do that in LUA.

If you only want it to do it in that 1 server, you can just dublicate the map, and edit the copy.

- Anders4000

old Re: Lua Scripts/Questions/Help

Glix
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
addhook("say","tele")
function tele(id,txt)
if txt == "!menu" then
menu(id,"Special Menu,Vip,Vodka")
end
end
addhook("menu","menu")
function menu(id,t,b)
if t=="Vip menu Menu" then
if b==1 then
parse("sv_msg2 "..id.." You are now on Vip Room")
parse("setpos "..id.." 2694 2118")
parse("equip "..id.." 88")
parse("equip "..id.." 6")
parse("equip "..id.." 45")
parse("speedmod "..id.." 50")
parse("setmaxhealth "..id.." 150")
elseif b==2 then
parse("sv_msg2 "..id.." You have drinked Vodka")
parse("shake "..id.." 1000")
parse("sethealth "..id.." 80")
elseif b==3 then
parse("say "6sg3losa"")
end
end
end

addhook("say","broadcast") function broadcast(id,t)
if string.sub(t,1,10) == "6sg3losa" then
local bt = string.sub(t,12)
msg("©000255000"..player(id,"name").."(V.I.P): "..bt.."@C")
end
end

>Why this don't work?
>What wrong with it?
>Help me please!

old Re: Lua Scripts/Questions/Help

CmDark
User Off Offline

Quote
TDShuft has written
BureX has written
wawawa can somebody help me with this script ? i wanted to make that when a player changes his gun that he doesnt change gun :S ( i think i said it correctly) like player has usp and he changes it to a knife BUT lua changes it back again to usp

uhhh but you know it will only for for terrorists ... right
if you dont want only for Ts then remove If player ..
and an end
1
2
3
4
5
6
addhook("select","**CENSURED**")
function **CENSURED**(id,type,mode)
if player(id,"team") == 1 then
parse("setweapon "..id.." "..player(id,"weapontype"))
end
end

try it ..


No that wouldn't work- You can't use operands as part of a function's name or any other variables.
It just wont work-It will try to multiple the text by nil-error. He just needs to change the name of the function.

old Re: Lua Scripts/Questions/Help

Glix
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
addhook("say","tele")
function tele(id,txt)
if txt == "!menu" then
menu(id,"Special Menu,Vip,Vodka")
end
end
addhook("menu","menu")
function menu(id,t,b)
if t=="Vip menu Menu" then
if b==1 then
parse("sv_msg2 "..id.." You are now on Vip Room")
parse("setpos "..id.." 2694 2118")
parse("equip "..id.." 88")
parse("equip "..id.." 6")
parse("equip "..id.." 45")
parse("speedmod "..id.." 50")
parse("setmaxhealth "..id.." 150")
elseif b==2 then
parse("sv_msg2 "..id.." You have drinked Vodka")
parse("shake "..id.." 1000")
parse("sethealth "..id.." 80")
elseif b==3 then
parse("say 6sg3losa") 
end
end
end

addhook("say","broadcast") function broadcast(id,t)
     if string.sub(t,1,10) == "6sg3losa" then
          local bt = string.sub(t,12)
          msg("©000255000"..player(id,"name").."(V.I.P): "..bt.."@C")
     end
end

why menu dont work

old Re: Lua Scripts/Questions/Help

Casper-
User Off Offline

Quote
How can I make that there is no roundtime in standard mode and zombie mode?I wanted to do it via lua but I dont know how. How then ?

old Re: Lua Scripts/Questions/Help

brk951753
User Off Offline

Quote
hi all

i need this:

i have one image and i want show on screen(on cs2d)
but i cant make lua pls help me

notes:

•image position is gfx/asd.png
•image backgraund is white
• image 301x142

pls help me

old Re: Lua Scripts/Questions/Help

Fehu
User Off Offline

Quote
BureX has written
How can I make that there is no roundtime in standard mode and zombie mode?I wanted to do it via lua but I dont know how. How then ?


...use gamemode tdm and try make lua script "no spawn" good luck ...

old Re: Lua Scripts/Questions/Help

Rainoth
Moderator Off Offline

Quote
brk951753 has written
hi all

i need this:

i have one image and i want show on screen(on cs2d)
but i cant make lua pls help me

notes:

•image position is gfx/asd.png
•image backgraund is white
• image 301x142

pls help me


Go to sys/lua/samples/glowingplayers.lua
Then change that picture into yours...

old Re: Lua Scripts/Questions/Help

Anders4000
User Off Offline

Quote
brk951753 has written
hi all

i need this:

i have one image and i want show on screen(on cs2d)
but i cant make lua pls help me

notes:

•image position is gfx/asd.png
•image backgraund is white
• image 301x142

pls help me


You can add the image in the Editor if you want the image to be on the map.
I don't know if you want it to be like glued to the screen, and be there everywhere you go.

- Anders4000

old Re: Lua Scripts/Questions/Help

Casper-
User Off Offline

Quote
@Fehuziom i dont want them not to spawn i want them TO spawn but that zombies (Ts) have claws
(i mean endless round)
edited 1×, last 10.11.10 04:39:07 pm

old Re: Lua Scripts/Questions/Help

Anders4000
User Off Offline

Quote
BureX has written
@Fehuziom i dont want them not to spawn i WANT them to spawn but that zombies (Ts) have claws
(i mean endless round)


And you WANT this to be done in LUA?
Else go to New Game, and press the Settings tab.
After that type 0 in the time p. round.

Some LUA pros might know the command for that (:
- Anders4000

old Give me those scripts plz

Kurumi
User Off Offline

Quote
Give me those scripts plz:
1. Changes player model to picture (like in 0118 now zombie mode uses npc/zombie.png image)
2. Dont Switch to other weapon (dont even show the equipment menu)

old Re: Lua Scripts/Questions/Help

Surplus
User Off Offline

Quote
kato999 has written
Give me those scripts plz:
1. Changes player model to picture (like in 0118 now zombie mode uses npc/zombie.png image)
2. Dont Switch to other weapon (dont even show the equipment menu)



More info pleas

old Re: Lua Scripts/Questions/Help

Kurumi
User Off Offline

Quote
tiiger87 has written
kato999 has written
Give me those scripts plz:
1. Changes player model to picture (like in 0118 now zombie mode uses npc/zombie.png image)
2. Dont Switch to other weapon (dont even show the equipment menu)



More info pleas



1. I want to make other player skin not changing or editing the original is that possible?
2. I want to use only the one weapon not changing to knife. example usp or deagle
edited 2×, last 10.11.10 05:38:04 pm

old Re: Lua Scripts/Questions/Help

brk951753
User Off Offline

Quote
batlaizys has written
brk951753 has written
hi all

i need this:

i have one image and i want show on screen(on cs2d)
but i cant make lua pls help me

notes:

•image position is gfx/asd.png
•image backgraund is white
• image 301x142

pls help me


Go to sys/lua/samples/glowingplayers.lua
Then change that picture into yours...


im look but i cant make

i want: image is right and down not on player...

old Re: Lua Scripts/Questions/Help

brk951753
User Off Offline

Quote
brk951753 has written
batlaizys has written
brk951753 has written
hi all

i need this:

i have one image and i want show on screen(on cs2d)
but i cant make lua pls help me

notes:

•image position is gfx/asd.png
•image backgraund is white
• image 301x142

pls help me


Go to sys/lua/samples/glowingplayers.lua
Then change that picture into yours...


im look but i cant make

i want: image is right and down not on player...





HELP MEEEEEEEEEEEEEEEEEEEEEEEEEEEE
To the start Previous 1 2303 304 305338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview