AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   custom_weapon_damage help!!! (https://forums.alliedmods.net/showthread.php?t=127233)

SaM.ThE.MaN 05-18-2010 15:55

custom_weapon_damage help!!!
 
custom_weapon_dmg ( weapon, att, vic, damage, hitplace=0 )

What should i replace attack and victom with , lil help :D

wrecked_ 05-18-2010 16:06

Re: custom_weapon_damage help!!!
 
The player index of the attacker you wish and then player index of the victim you wish...

SaM.ThE.MaN 05-18-2010 17:45

Re: custom_weapon_damage help!!!
 
oh thank you dear.
one more question ,what are their indexes.
thanxxxxxxxxxxxxxxxx alot wrecked you do help alot.really thank you

wrecked_ 05-18-2010 19:24

Re: custom_weapon_damage help!!!
 
No problem.

The indexes are achieved many ways. It is more common that they are passed as function parameters, but it is done other ways, as well.

Ex:
Code:
#include <hamsandwich> #include <fakemeta> public client_connect( id ) {     // id is a player index passed through func parameters } public plugin_init() {     RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_ak47", "HamPrimAttack" ) } public HamPrimAttack( Ent ) {     new id = pev( Ent, pev_owner )     // id is a player index not passed in function params }


All times are GMT -4. The time now is 03:53.

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