English Lua Scripts/Questions/Help

6,770 replies
Goto Page
To the start Previous 1 2 ... 161 162 163 ... 338 339 Next To the start
11.02.10 07:48:24 pm
Up
Flametail
User
Offline Off
How can I make a whole lotta scripts execute upon starting a map?


AKA: when a map is started, turret health is set higher, and price lower, etc etc. I hate having to type all those scripts in the console whenever I start a game
11.02.10 08:07:31 pm
Up
memo
COMMUNITY BANNED
Offline Off
Flametail has written:
How can I make a whole lotta scripts execute upon starting a map?


AKA: when a map is started, turret health is set higher, and price lower, etc etc. I hate having to type all those scripts in the console whenever I start a game


you want a script to set your turret health and price when you start your server .

if that here is a little script to make all that you must put it on Counter-Strike 2D/sys/lua/server remember to rename this script to Server.lua,before starting any servers . here the script to make all that :-
Spoiler >


here if you need more command check Cs2d.com
Call Of Duty - World At War [Work on progress] | official CoD scripts site
11.02.10 08:14:41 pm
Up
Redefinder
User
Offline Off
memo has written:
you want a script to set your turret health and price when you start your server .

if that here is a little script to make all that you must put it on Counter-Strike 2D/sys/lua/server remember to rename this script to Server.lua,before starting any servers . here the script to make all that :-

I think he means making a script which only runs when you start a specified map.
11.02.10 08:38:38 pm
Up
Flametail
User
Offline Off
yeah, specific map only please.


and is there a command i can use to equip all players with certain weapons? instead of one at a time?

instead of equip 1 88
equip whatever you put for all players 88

I noticed that 0 doesnt work in this case
11.02.10 08:44:50 pm
Up
Redefinder
User
Offline Off
Flametail has written:
and is there a command i can use to equip all players with certain weapons? instead of one at a time?

instead of equip 1 88
equip whatever you put for all players 88

I noticed that 0 doesnt work in this case

Yes there is...
Code:
1
2
3
4
addhook("spawn","getallweapons")
function getallweapons(id)
parse("equip "..id.." 88")
end
11.02.10 09:53:36 pm
Up
Anders4000
User
Offline Off
@Flametail

If you want to make a script for a specific map you have to save the lua-script in the "maps" folder. You'll also have to save is as the mapname and then with ".lua" in the end.
Fx. if i want to make a lua-script for de_dust i'll save the script in the "maps" folder called "de_dust.lua"

When you click "New game" in the cs2d menu you will also have to go into "More settings" and set "mp_luamap" to 1. Else it will not work i think (:
11.02.10 10:05:36 pm
Up
Flacko
User
Offline Off
The only problem I see in making a lua file called as the map is that it will be sent to the visitors, and if you use a common map like de_dust your folder will be spammed with scripts

You can use a startround hook and use game("sv_map")
11.02.10 10:19:36 pm
Up
0ito
User
Offline Off
need help for put the terrorists and counter-terrorist in the survivors in the zombie mod if someone help me on what to put in the script I thank
11.02.10 11:04:31 pm
Up
- Dark Void -
User
Offline Off
yet another question what is a: coroutine
i know how to create them and other things with them but what are they?
IMG:http://i41.tinypic.com/wrf2q9.png
12.02.10 12:40:28 am
Up
memo
COMMUNITY BANNED
Offline Off
0ito has written:
need help for put the terrorists and counter-terrorist in the survivors in the zombie mod if someone help me on what to put in the script I thank


Yea that's good question i need to know if it possible to make Survivor team have both of Tt & Ct players,and if it possible to make a new Zombies skin and put them on the Zombies Team ?
Call Of Duty - World At War [Work on progress] | official CoD scripts site
12.02.10 12:44:24 am
Up
SQ
Moderator
Offline Off
If you only need to know if that's possible...
Yes, that's possible. (About skins)
edited 1×, last 12.02.10 01:00:48 am
12.02.10 04:12:28 am
Up
Flametail
User
Offline Off
redefinder has written:
Flametail has written:
and is there a command i can use to equip all players with certain weapons? instead of one at a time?

instead of equip 1 88
equip whatever you put for all players 88

I noticed that 0 doesnt work in this case

Yes there is...
Code:
1
2
3
4
addhook("spawn","getallweapons")
function getallweapons(id)
parse("equip "..id.." 88")
end


same idea for a global speedmod or setmaxhealth?
12.02.10 05:37:40 pm
Up
Maniek
User
Offline Off
Hi

I need script for ammo like this.
When I attack with matchet on player position will be spawn primarammo and secondary ammo .
Can somoeone help me ???

Sorry for my bad English I'm from Polish.
12.02.10 06:25:41 pm
Up
AlexVender
User
Offline Off
edited 1×, last 12.02.10 06:43:22 pm
12.02.10 06:51:01 pm
Up
- Dark Void -
User
Offline Off
another question i am a little confused
Code:
1
2
3
if not (variable) then
...
end

would continue if variable is not a false value. correct?
and
Code:
1
2
3
if (variable) then
...
end

would continue if variable is true. correct?
IMG:http://i41.tinypic.com/wrf2q9.png
12.02.10 07:05:53 pm
Up
TimeQuesT
User
Offline Off
what do you want i'm not understanding you right.
do you mean a boolean?

if x == true then
xyz
end

if x == false then / if x ~=true(the same)
xyz
end
Muh
12.02.10 08:18:14 pm
Up
SQ
Moderator
Offline Off
@- Dark Void -
You are right, it's correct.
12.02.10 09:07:53 pm
Up
Redefinder
User
Offline Off
Flametail has written:
same idea for a global speedmod or setmaxhealth?

Just change commands.
For speedmod:
Code:
1
parse("speedmod "..id.." 10)

For health:
Code:
1
parse("setmaxhealth "..id.." 250)
12.02.10 11:07:21 pm
Up
dENd
User
Offline Off
Can someone help me i wana make a script (for admins) but i dont have lua knowledge plz reply
© Unreal Software, 2003-2021 | This website is using cookies because they are delicious | Disclaimer | Site Notice
12.02.10 11:14:04 pm
Up
Vectarrio
User
Offline Off
Kking has written:
Can someone help me i wana make a script (for admins) but i dont have lua knowledge plz reply

What exactly do you want?
To the start Previous 1 2 ... 161 162 163 ... 338 339 Next To the start