Raised This Month: $ Target: $400
 0% 

Need help on understanding the coding of a plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-20-2011 , 14:40   Re: Need help on understanding the coding of a plugin
Reply With Quote #1

Quote:
Originally Posted by anupm View Post
so can i block a firing completely with this function ?
This function has nothing to do with firing a weapon.
__________________
fysiks is online now
anupm
Senior Member
Join Date: May 2010
Old 06-20-2011 , 14:51   Re: Need help on understanding the coding of a plugin
Reply With Quote #2

Quote:
Originally Posted by fysiks View Post
This function has nothing to do with firing a weapon.
then how come he is delaying the firing ?
anupm is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-20-2011 , 15:12   Re: Need help on understanding the coding of a plugin
Reply With Quote #3

Quote:
Originally Posted by anupm View Post
then how come he is delaying the firing ?
With that logic, you could say that is_user_alive() gives me noclip because I check that before giving player noclip.
You have to understand what the code does by knowing what specific functions do.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-20-2011 , 15:14   Re: Need help on understanding the coding of a plugin
Reply With Quote #4

If a player buys or picks up a weapon, he becomes the owner of that weapon.
The player's id gets assigned to pev_owner of the weapon.

What that stock does is go through all the weapons & check if the weapon belongs to the id that is passed as the thirth param of the function.

It are these that change the fire rate.
PHP Code:
static Float:Delay,Float:M_Delay
Delay 
get_pdata_floatEnt464) * N_Speed
M_Delay 
get_pdata_floatEnt474) * N_Speed
if (Delay 0.0)
{
    
set_pdata_floatEnt46Delay4)
    
set_pdata_floatEnt47M_Delay4)

__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.

Last edited by drekes; 06-21-2011 at 09:47.
drekes is offline
Send a message via MSN to drekes
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-20-2011 , 16:39   Re: Need help on understanding the coding of a plugin
Reply With Quote #5

Quote:
Originally Posted by drekes View Post
What that stock does is go through all the weapons & check if the weapon belongs to the id that is passed as the first third param of the function.
__________________
fysiks is online now
anupm
Senior Member
Join Date: May 2010
Old 06-21-2011 , 00:14   Re: Need help on understanding the coding of a plugin
Reply With Quote #6

Thank you fysiks , drekes ,Exolent[jNr].

There is two types of delay . Is it for primary and secondary weapon ?
Also is it possible to block the attack completely and then again as my wish make it normal ?
anupm 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 23:23.


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