AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Huge of problem around me :X (https://forums.alliedmods.net/showthread.php?t=105404)

Xevious 10-04-2009 09:00

Huge of problem around me :X
 
PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN    "Heart Shot"
#define AUTHOR    "OT"
#define VERSION    "1.0"

#define BONE_HEART        6

new pcv_multi

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_cvar("heart_shot_vs"VERSION, (FCVAR_SERVER FCVAR_SPONLY))
    
    
pcv_multi register_cvar("heart_shot_multi""2.0")
    
    
RegisterHam(Ham_TraceAttack"player""fw_traceattack")
}

public 
fw_traceattack(victimattackerFloat:damageFloat:direction[3], ptrbits)
{
    new 
Float:origin[3], Float:end[3]
    
    
engfunc(EngFunc_GetBonePositionvictimBONE_HEARToriginend)
    
get_tr2(ptrTR_vecEndPosend)
    
    if (
get_distance_f(originend) < 3.0)
    {
        
SetHamParamFloat(3damage get_pcvar_float(pcv_multi))
        return 
HAM_HANDLED
    
}
    
    return 
HAM_IGNORED


[Questions] {a lot why}
------------------------------
1 | #define BONE_HEART 6 , what is the point of other bone?
2 | fw_traceattack(victim, attacker, Float:damage, Float:direction[3], ptr, bits , victim is what mean? what is direction[3]? 3 mean what? bit and ptr also what mean .. .
3 | Float:origin[3], Float:end[3] , origin[3] is what? , end[3] is what?
4 | get_tr2(ptr, TR_vecEndPos, end , this i at function found but cant understand.
5 | (get_distance_f(origin, end) < 3.0) , why get_distance need F?
6 | return HAM_HANDLED is what?
7 | return HAM_IGNORED is what?
-------------------------------------------------
Sorry wasting all guy's time to answer my foolish questions.:wink:
---Code from Heart Shot plugin by OT

xPaw 10-04-2009 09:14

Re: Huge of problem around me :X
 
1. Search
3. Variables -_-
4. End pos of traceline
5. float
6. return
7. return

Xevious 10-04-2009 09:19

Re: Huge of problem around me :X
 
Hehe .....i found it .

but next time , please write clearly if you want to teach yup.


All times are GMT -4. The time now is 22:40.

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