Forum

> > CS2D > Scripts > only 1 satchel charge
Forums overviewCS2D overview Scripts overviewLog in to reply

English only 1 satchel charge

5 replies
To the start Previous 1 Next To the start

old only 1 satchel charge

iii
User Off Offline

Quote
If you equip a player with a satchel charge he get 5.
i want to make that he can use only one. so i thought i make a table with players id and if he get satchels i set the number to 2 (in the table). If he use one with attack i set it to 1. But then i saw that you can't return attack to disable the use of this weapon. if you strip the weapon after the throw he can't use the remote bomb...
Do you have an idea?

old Re: only 1 satchel charge

SD
User Off Offline

Quote
I think it's impossible to equip specific amount of ammo yet. All weapons come with maximum ammo available.

old Re: only 1 satchel charge

iii
User Off Offline

Quote
this idea i had, too, but when you strip the rest, you can not make explode the last one. i tested it

old Re: only 1 satchel charge

mafia_man
User Off Offline

Quote
There's a trick how to equip player with unequipable items and with custom amount of them.
1
2
3
4
5
6
local oldx, oldy = player(id, "x"), player(id, "y");
for local i = 1, 2 do -- It will equip with two satchel charges (change 2 to desired amount)
	parse("spawnitem 89 ".. player(id, "tilex") .. " ".. player(id, "tiley")); -- Change 89 to desired item
	parse("setpos ".. id .." -1 -1");
	parse("setpos ".. id .." ".. oldx .. " ".. oldy);
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview