i am newbie, need advice!
12 replies



02.09.12 09:19:13 am
Hi all.
I am a newbie in scripting. So I need help. So here it is:
-i need a healing system. +5 health point per second.
-i need a hurt message health at 30 show a message
"You are hurt, get to cover!"
-i need a kind of weapon selection (example)
-CT:
- PPS43
- mosin-nagnat
- SVT40
- scoped mosin-nagnat
- PPSH-42
-T
- MP40
- kar98k
- gewehr 43
- scoped kar98k
- MP44
Can anyone tell me how to do it?
If yes thank you
*will be nice if a professional script maker give me a advice
I am a newbie in scripting. So I need help. So here it is:
-i need a healing system. +5 health point per second.
-i need a hurt message health at 30 show a message
"You are hurt, get to cover!"
-i need a kind of weapon selection (example)
-CT:
- PPS43
- mosin-nagnat
- SVT40
- scoped mosin-nagnat
- PPSH-42
-T
- MP40
- kar98k
- gewehr 43
- scoped kar98k
- MP44
Can anyone tell me how to do it?
If yes thank you
*will be nice if a professional script maker give me a advice
You should just check the file archive, there you will find pretty much everything you need. Addionally you can search the internet for some lua basic tutorials:
Btw, if you would have spent 2 seconds for search you would have found http://www.unrealsoftware.de/files_show.php?file=8888 for sure. Also the other stuff is pretty basic, I think there are already some default lua scripts which come with the game, which fit your needs. Haven't installed the game at the moment, but I'm pretty damn sure about it, so just check the sys/lua folder.
Btw, if you would have spent 2 seconds for search you would have found http://www.unrealsoftware.de/files_show.php?file=8888 for sure. Also the other stuff is pretty basic, I think there are already some default lua scripts which come with the game, which fit your needs. Haven't installed the game at the moment, but I'm pretty damn sure about it, so just check the sys/lua folder.
www.cs2d.me has launched - Join Now
*CLOSED*

I'm 100% sure he want COD5:WaW script.
@
unknown soldier: Learn basics, then you won't have to ask.
@

Trust me, I'm an engineer |
DC approved
Super extra mod for CS2D (64), yeah!



Health script:
I'm
Gaios
I am writing from my brother's account.
I do not know if that works. I am writing from Android
Code:
1
2
3
4
5
2
3
4
5
addhook('second','gajospl_second')
function gajospl_second(id)
local heal=player(id,"health")
parse('sethealth '..id..' '..heal..'+5')
end
function gajospl_second(id)
local heal=player(id,"health")
parse('sethealth '..id..' '..heal..'+5')
end
I'm

I am writing from my brother's account.
I do not know if that works. I am writing from Android
Ban Reason: Multiple Accounts
Code:
Fails. Hook "second" does not work with id argument. parse('sethealth '..id..' '..heal..'+5') won't work, becouse with cs2d console can't use math operations. 1
2
3
4
5
2
3
4
5
addhook('second','gajospl_second')
function gajospl_second(id)
local heal=player(id,"health")
parse('sethealth '..id..' '..heal..'+5')
end
function gajospl_second(id)
local heal=player(id,"health")
parse('sethealth '..id..' '..heal..'+5')
end
Code:
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook('second','boltpl_second')
function boltpl_second()
for _,id in pairs(player(0,"tableliving")) do
local hp=player(id,"health")+5
parse('sethealth '..id..' '..hp)
end
end
function boltpl_second()
for _,id in pairs(player(0,"tableliving")) do
local hp=player(id,"health")+5
parse('sethealth '..id..' '..hp)
end
end
Trust me, I'm an engineer |
DC approved
Super extra mod for CS2D (64), yeah!



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
addhook('second','boltpl_second')
function boltpl_second()
for _,id in pairs(player(0,"tableliving")) do
local hp=player(id,"health")+5
parse('sethealth '..id..' '..hp)
end
for _,id in pairs(player(0,"tableliving")) do
local hp2=player(id,"health")
if hp2 < 41 then
msg2(id,"©255000000You are hurt, get to cover!")
end
end
end
function boltpl_second()
for _,id in pairs(player(0,"tableliving")) do
local hp=player(id,"health")+5
parse('sethealth '..id..' '..hp)
end
for _,id in pairs(player(0,"tableliving")) do
local hp2=player(id,"health")
if hp2 < 41 then
msg2(id,"©255000000You are hurt, get to cover!")
end
end
end
Lol.
You asked for help with such impolite sayings? I wouldn'thelp you, sir.
cs2dbbs.gameclub.tw - LEGACY
Thank you for your all help sir.
I apologize for my rudeness. Because I am not good at english too.
@bolt_pl (no, sir I am not doing COD5 sir. I just want to test my scripting abilities, and I am about test in cod2 it lot easier.
lol
I apologize for my rudeness. Because I am not good at english too.
@bolt_pl (no, sir I am not doing COD5 sir. I just want to test my scripting abilities, and I am about test in cod2 it lot easier.
lol
edited 1×, last 02.09.12 06:16:07 pm
You need advice ?
Don't post things in there wrong places.
Don't post things in there wrong places.
#Discord CS2D Rework - https://discord.gg/pbhdVdj
Addhook("spawn", "stalingrad")
Function stalingrad(Id)
If player(Id,"team") == 1 then
Menu(Id,"select weapon,scoped kar98k|get.")
Elseif player(I'd, "team") == 2 then
Menu(Id,"select weapon,scoped mosin-nagnat|get.")
End
End
Should script like this?
Function stalingrad(Id)
If player(Id,"team") == 1 then
Menu(Id,"select weapon,scoped kar98k|get.")
Elseif player(I'd, "team") == 2 then
Menu(Id,"select weapon,scoped mosin-nagnat|get.")
End
End
Should script like this?
Like this, learn how to not capitalize anything important like
addhook, function, end, if, elseif, else
addhook, function, end, if, elseif, else
Code:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("spawn","stalingrad")
function stalingrad(id)
if player(id,"team") == 1 then
menu(id,"select weapon,scoped kar98k|get.")
elseif player(id,"team") == 2 then
Menu(id,"select weapon,scoped mosin-nagnat|get.")
end
end
function stalingrad(id)
if player(id,"team") == 1 then
menu(id,"select weapon,scoped kar98k|get.")
elseif player(id,"team") == 2 then
Menu(id,"select weapon,scoped mosin-nagnat|get.")
end
end



