ms100() updating it.
Forum
CS2D Scripts Lua Scripts/Questions/Helpms100() updating it.
E.G.:
1
2
3
4
2
3
4
addhook("join","rp.join") function join(id) rp.job[id]=1 end
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
function jobhud(id) local i = 1,32 do 	if(player(i,"exists")) then 	jobn = rp.job[id] 		[b]hudtxt(i,2,'255255255','Job: '..jobn,5,420) [/b] (Intentional) 	end end end
1
jobn = rp.job[[b]id[/b]]
"id"? no "i"?
rp.job = {}
or
rp.job = initArray(32)
Flacko has written
Oy, did that for my money table but forgot it for my Job one. Thanks.Did you actually initiate your table?
rp.job = {}
or
rp.job = initArray(32)
rp.job = {}
or
rp.job = initArray(32)
Edit: Still doesn't want to work.
Double edit: Some fooling, got it to work.
edited 2×, last 07.03.10 03:15:29 am
1
2
3
4
5
2
3
4
5
- itemtype(type,"value")	Return a value of an item type: 				name, dmg, dmz_z1, dmg_z2, 				rate, reload, ammo, ammoin, 				price, range, dispersion, 				slot, recoil
How i can work with it? Can someone write sample for me?
1
print(itemtype(1,"name")) --> USP
1
2
3
2
3
for i = 1, 88, 1 do 	print(itemtype(i,"name")) end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
dofile("sys/lua/wrapper.lua") function msg2(id,msg) 	parse("sv_msg2 "..id.." \""..msg.."\"") addhook("buy","_buy_") function _buy_(id,iid) 	msg2("Congratulations!") 	msg2("You have successfully bought a: "..itemtype(iid,"name")) 	msg2("This weapons features a "..itemtype(iid,"damage").."Hp Damage") 	msg2("A rate of fire of "..itemtype(iid,"rate").." RPM") 	msg2("And a dispersion of "..itemtype(iid,"dispersion")) 	msg2("Please come back soon ^^") end
omg ... So, i can't do my custom weapon?
like custom dmg,rate,ammo,range ...
edited 1×, last 07.03.10 08:44:00 pm
There are few ways to make own weapons, bullets, ect...
But it's not so simple as you thought.
I'm making tutorial for this stuff.
Or maybe I will post it sooner.
Blazzingxx has written
Yeah, otherwise I wouldn't say that.
I'm making tutorial for this stuff.
Or maybe I will post it sooner.
I'm making tutorial for this stuff.
Or maybe I will post it sooner.
Oho. Im listening.
Classic SuperHero 82.135.231.192:36970
I'm going to be there for 10 mins, so I can show high leveled heroes with objects...
1
2
3
4
5
6
2
3
4
5
6
primary_weapons = {10,11,20,21,22,23,24} addhook('minute','dm_minute') function dm_minute() msg('Primary Weapons is: '..primary_weapons) end
LUA ERROR: Attempt to call a table value
/// is it possible to fix it?
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
primary_weapons = {10,11,20,21,22,23,24} addhook('minute','dm_minute') function dm_minute() 	local weapons = '' 	for i = 1 , #primary_weapons, 1 do 		weapons = weapons..primary_weapons[i]..' ' 	end 	msg('Primary Weapons is: '..weapons) end