Forum

> > CS2D > Scripts > Flare!
Forums overviewCS2D overview Scripts overviewLog in to reply

English Flare!

17 replies
To the start Previous 1 Next To the start

old Flare!

M0BSTAZ
User Off Offline

Quote
hi everyone!!

I make flare with item, then if you buy the flare, drop in to the floor then if you claim and press inventory then The name of flare has been change like this HP [250] and [Turbo Speed] then when equip HP [250] then set health then if equip [Turbo Speed] then set speed 200...

I have error of this script! when i open my console nothing errors appears, but no Hooks on console...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
ITEMs = {
 [1] = {equip="54",speed="250"},
}



ITEMs[1].func = function(id,speed)
parse("equip '..id..' '..equip..'")
parse("speedmod '..id..' '..speed..'")
end


addhook("spawn","staff_spawn")
function staff_spawn(id,item)
 parse('spawnitem '..equip..' '..player(id,'tilex')..' '..player(id,'tiley'))
end

I hope you help me
Thank you

old Re: Flare!

AlcatrazZ
BANNED Off Offline

Quote
I don't understand this shit. Whats inventory?!

old Re: Flare!

Rainoth
Moderator Off Offline

Quote
You might want to change the title of your thread. "Flare!" does not say that you're trying to make a script which utilizes flare weapon.
I have no idea what you were trying to say. Anyways, I changed few parts, maybe it'll help you make whatever you're making.
Please note that Max speed value is 100
1
2
3
4
5
6
7
8
9
10
11
12
13
14
ITEMs = {
 [1] = {equip=54,speed=25}
		}

ITEMs[1].func = function(id)
	parse("equip "..id.." "..ITEMs[1].equip)
	parse("speedmod "..id.." "..ITEMs[1].speed)
end


addhook("spawn","staff_spawn")
function staff_spawn(id)
	parse('spawnitem '..ITEMs[1].equip..' '..player(id,'tilex')..' '..player(id,'tiley'))
end

@user AlcatrazZ: If you don't understand then don't reply as it serves no purpose (and may be considered spam)

old Re: Flare!

M0BSTAZ
User Off Offline

Quote
not work! when i buy speed no drop flare!

old Re: Flare!

M0BSTAZ
User Off Offline

Quote
i don't understand your language.. F**k!

EDIT: No work! if i spawn then drop flare then when i press F2 no Inventory menu!!

old Re: Flare!

AlcatrazZ
BANNED Off Offline

Quote
@user M0BSTAZ: why you want to custom inventory using menu if you already have a default inventory installed into cs2d.
-.- you have a flare in hand and in inventory, and when you drop this, item from custom inventory will removed. OMG why you need this sh*t?!

old Re: Flare!

Myzz
User Off Offline

Quote
Maybe this work.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
ITEMs = {
 [1] = {equip=54,speed=25}
          }

ITEMs[1].func = function(id)
     parse("equip "..id.." "..ITEMs[1].equip)
     parse("speedmod "..id.." "..ITEMs[1].speed)
end


addhook("spawn","staff_spawn")
function staff_spawn(id)
     parse('spawnitem '..ITEMs[1].equip..' '..player(id,'tilex')..' '..player(id,'tiley'))
end

Admin/mod comment

Copying user Rainoth's code character by character and claiming you're helping isn't acceptable. You have been warned. /Engi

old Re: Flare!

M0BSTAZ
User Off Offline

Quote
dude you copy raining mamoths says!! not work

old Re: Flare!

Myzz
User Off Offline

Quote
No, I don't copy, It's equal nothing more.

old Re: Flare!

EngiN33R
Moderator Off Offline

Quote
Seriously, we cannot help you properly if you don't give us more information. What in God's name do you want? When a flare is dropped and picked up again, you want the player to get a choice whether to get speed or health? You need to explain this coherently and clearly.

old Re: Flare!

Cs2dTunisie
GAME BANNED Off Offline

Quote
I know what he need exacly.He wants to make Amstria lua.
he only need 1 exemple flare.


He need a good Inventory and he wants flares

Flare Type 1:Turbo Flare
Flare Type 2:HP flare
Flare Type 3:....

thats all
edited 1×, last 17.07.14 10:55:12 am

old Re: Flare!

M0BSTAZ
User Off Offline

Quote
yes!! you have a exactly what i mean :D!!

old Re: Flare!

r4ndxm
User Off Offline

Quote
Ehm.

user M0BSTAZ has written
I have error of this script! when i open my console nothing errors appears, but no Hooks on console...


Wait, what the hell, that's impossible, there must be atleast errors or hooks in the console. Not enough info or you just don't know how to run the script.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview