JB Shot4Shot
on my server when i choose Shot4Shot im get Deagle with 7 Bullet.
How can I set to me receives one Bullet and the other 0? Shot4Shot Every Shot 1 Bullet If someone would explain to me, appreciate it very much and will explain where to put it in the Case or stock .. |
Re: JB Shot4Shot
I'm glad to see your trying to learn.
When you give the player a weapon use cs_set_weapon_ammo() to set the clip ammo back to 1 or 0. For a shot4shot system, the next step is to block a player's weapon from firing so he can't cheat - using m_flNextPrimaryAttack. You should then register FM_CmdStart and use the UC Handle to detect a shot, in which you would give the player 1 backpack ammo ( so he will reload ), block his weapon from firing with the above method, and then allow the other player to fire. When the shot4shot is over, you should unregister FM_CmdStart and allow both players to fire again. Have a go at that. |
Re: JB Shot4Shot
Wow thanks for the help, the problem is how do I set 1-0, it did not understand
I will try to read again and again That my case of > EventCurWeapon PHP Code:
PHP Code:
|
Re: JB Shot4Shot
For starters, you really need to use a better method than CurWeapon to restrict the player's weapons, such as stripping them upon game start.
When you give the player a deagle you can do something like this: Code:
And if you wanted to restrict the Guard from shooting ( and allow the Prisoner to shoot first ), you could extend this to: Code:
|
Re: JB Shot4Shot
Quote:
that give 7 bullet to Prisoner and Guard = but 0 ammo that code just part from my code..for test PHP Code:
|
Re: JB Shot4Shot
PHP Code:
add it to the s4s pistol fight part |
Re: JB Shot4Shot
@FFF remember I said to scrap the FM Utility.
@Battousai-sama there is no point in registering CurWeapon since player's weapons can simply be removed at the start of the game. I see that you also use it to replace the player's bullet, but clip ammo on the hud will not be updated - therefore always show 0, the gun will look as if it has no bullets in it, and there will be no reload sequence. Not to mention that you would register the event to only be called on deagle and when clip ammo is 0 in this case to be efficient. |
Re: JB Shot4Shot
Quote:
oh and thats only part of event code took the deagle part only frm it O.o |
Re: JB Shot4Shot
Quote:
|
Re: JB Shot4Shot
Quote:
|
| All times are GMT -4. The time now is 10:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.