Forum

> > CS2D > Scripts > Fast Reload Bind
Forums overviewCS2D overview Scripts overviewLog in to reply

English Fast Reload Bind

11 replies
To the start Previous 1 Next To the start

old Fast Reload Bind

grizbim
User Off Offline

Quote
Hi.
I'm looking for a long time a bind that when the m4a1 has 3 ammo and when you press R the m4a1 will have 30 instantly without spend ammo and without spending time reloading. But on each gun.

old Re: Fast Reload Bind

grizbim
User Off Offline

Quote
user GeoB99: I'm not looking for this script, i'm looking for a a bind script. that when you put on console the bind and when you press R you will get the full weapon's ammos.

old Re: Fast Reload Bind

Rainoth
Moderator Off Offline

Quote
Having it client side would count as cheating and thus it makes no sense to have possibility to do it. You can't quick-reload without a lua handling it on the server. It's not possible.

old Re: Fast Reload Bind

grizbim
User Off Offline

Quote
I'm using it temporary:

Spoiler >


I wanna that it works as a bind... How can I do that?
PD: When you join to server you can't quick-reload. you must put the bind on the console.

old Re: Fast Reload Bind

Rainoth
Moderator Off Offline

Quote
Are you serious? I already told you.
Look:
Both 'equip' and 'setweapon' are serversided commands so you as a client in the server can't access them. It's NOT possible.

old Re: Fast Reload Bind

_Yank
User Off Offline

Quote
@user Rainoth: Maybe he's saying that and he's the server.
If that's the case, if you are the server, here's the script:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
addhook("say", "triggDis", -99999)
function triggDis(id, text)
	if text == "!quickReload" then
		parse("equip "..id.." "..player(id, "weapontype"))
		parse("setweapon "..id.." "..player(id, "weapontype"))
		return 1
	end
end

-- Optional (Tell the players to bind)
elapsedMinutes = 0
addhook("minute", "bindTip")
function bindTip()
	elapsedMinutes = elapsedMinutes + 1
	if elapsedMinutes >= 3 and #player(0, "tableliving") > 0 then
		msg("\169000255000Type \169255255255/bind \"r\" \"say !quickReload\" \169000255000 for quick reloading!")
		elapsedMinutes = 0
	end
end

It is untested. my scripts tend to fail the first time they're executed because I always tend forget something

EDIT: And just as I said, I forgot to do something... Reload the actual weapon O.O Ugh, it's updated now.

old Re: Fast Reload Bind

grizbim
User Off Offline

Quote
How can i hide that when i bind it, the message would not appear on the chat? example: when i press R, i was saying !quickreload on the chat, i wanna hide it. Then thanks Yank for your script. It works.

old Re: Fast Reload Bind

_Yank
User Off Offline

Quote
@user grizbim: You're probably using another script that interacts with the say hook (an admin script for example) and it's causing a conflict.

old Re: Fast Reload Bind

grizbim
User Off Offline

Quote
user _Yank: I got an Admin Script, but how can I hide messages like "Server", if a player says it, the message would not be appeared on the chat.

old Re: Fast Reload Bind

Rainoth
Moderator Off Offline

Quote
You have to either assign priorities to say hooks but I'd recommend that you make it so you have only one say hook. You can also try to edit the parts regarding say hook but that requires some effort. In any case, you have to work with say hooks to solve the problem. It happens because you're calling multiple 'return's when you run server via say hooks.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview