English i am newbie, need advice!

12 replies
Goto Page
To the start Previous 1 Next To the start
02.09.12 09:19:13 am
Up
unknown soldier
User
Offline Off
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
02.09.12 10:27:18 am
Up
ExecL
User
Offline Off
Show me the script.

EDIT: Oh you asking us for a script
edited 1×, last 02.09.12 10:32:32 am
02.09.12 10:28:44 am
Up
Reaper
User
Offline Off
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.
www.cs2d.me has launched - Join Now *CLOSED*
02.09.12 10:45:07 am
Up
Avo
User
Offline Off
I'm 100% sure he want COD5:WaW script.
@user unknown soldier: Learn basics, then you won't have to ask.
Trust me, I'm an engineer | user DC approved file cs2d Super extra mod for CS2D (64), yeah!
02.09.12 10:45:25 am
Up
Gajosik
BANNED
Offline Off
Health script:
Code:
1
2
3
4
5
addhook('second','gajospl_second')
function gajospl_second(id)
local heal=player(id,"health")
parse('sethealth '..id..' '..heal..'+5')
end

I'm user Gaios
I am writing from my brother's account.

I do not know if that works. I am writing from Android
Ban Reason: Multiple Accounts
02.09.12 10:55:03 am
Up
Avo
User
Offline Off
Code:
1
2
3
4
5
addhook('second','gajospl_second')
function gajospl_second(id)
local heal=player(id,"health")
parse('sethealth '..id..' '..heal..'+5')
end
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.
Code:
1
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
Trust me, I'm an engineer | user DC approved file cs2d Super extra mod for CS2D (64), yeah!
02.09.12 11:04:16 am
Up
ExecL
User
Offline Off
Code:
1
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


Lol.
02.09.12 03:39:02 pm
Up
tom282f3
User
Offline Off
You asked for help with such impolite sayings? I wouldn'thelp you, sir.
cs2dbbs.gameclub.tw - LEGACY
02.09.12 05:58:52 pm
Up
unknown soldier
User
Offline Off
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
edited 1×, last 02.09.12 06:16:07 pm
02.09.12 09:25:42 pm
Up
Xirot
User
Offline Off
You need advice ?
Don't post things in there wrong places.
#Discord CS2D Rework - https://discord.gg/pbhdVdj
03.09.12 09:53:27 am
Up
unknown soldier
User
Offline Off
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?
03.09.12 09:57:23 am
Up
Jynxxx
User
Offline Off
Like this, learn how to not capitalize anything important like
addhook, function, end, if, elseif, else
Code:
1
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
03.09.12 09:25:06 pm
Up
omg
User
Offline Off
yeah thats fine
dont capitalize menu, its case sensitive
will code for food
To the start Previous 1 Next To the start