Raised This Month: $ Target: $400
 0% 

Solved How to Code Shotgun Reload for CS


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 11-12-2015 , 12:17   Re: How to Code Shotgun Reload for CS
Reply With Quote #1

Quote:
Originally Posted by CrazY. View Post
I do not quite understand your question, but try:

Code:
public plugin_init() {     RegisterHam(Ham_Weapon_Reload, "weapon_name", "fw_WeaponReload_Post", 1); } public fw_WeaponReload_Post(weapon_entity) {     new id = pev(weapon_entity, pev_owner);     if (g_has_name[id] && is_user_alive(id))     {         // code...     } }
__________________









Last edited by CrazY.; 11-12-2015 at 12:17.
CrazY. is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 11-14-2015 , 09:52   Re: How to Code Shotgun Reload for CS
Reply With Quote #2

Quote:
Originally Posted by CrazY. View Post
He isn't trying to detect when the player is reloading a weapon, he is trying to replicate shotgun reloading (shell by shell, not the whole clip at once) on some other weapon.
klippy is offline
hellmonja
Senior Member
Join Date: Oct 2015
Old 11-18-2015 , 10:09   Re: How to Code Shotgun Reload for CS
Reply With Quote #3

Quote:
Originally Posted by KliPPy View Post
He isn't trying to detect when the player is reloading a weapon, he is trying to replicate shotgun reloading (shell by shell, not the whole clip at once) on some other weapon.
Exactly what I was trying to do. And I want to set the clip size from 8 to just 3. So far I've treid the methods here and downloaded a couple of ZP shotguns to study. I'm having a hard time understanding to incorporate them in my code though...
hellmonja is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode