
No fall dmg
-
- Jau po truputį tampa savu
- Posts: 109
- Joined: 2011 Dec 14 11:24
- Skype: ptaha525
- Location: Vilnius
- Contact:
Re: No fall dmg
no fall dmg terams
Code: Select all
#include <amxmodx>#include <engine>#include <cstrike> #define FALL_VELOCITY 350.0 public plugin_init() { register_plugin("No fall damage", "0.2", "v3x"); if(!cvar_exists("mp_falldamage")) { register_cvar("mp_falldamage", "0"); }} new bool:falling[33]; public client_PreThink(id) { if(get_cvar_num("mp_falldamage") == 0 && is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T) { if(entity_get_float(id, EV_FL_flFallVelocity) >= FALL_VELOCITY) { falling[id] = true; } else { falling[id] = false; } }} public client_PostThink(id) { if(get_cvar_num("mp_falldamage") == 0 && is_user_alive(id)) { if(falling[id]) { entity_set_int(id, EV_INT_watertype, -3); } }}
- Attachments
-
No_Fall Damage_terrorist.amxx
- (1.98 KiB) Downloaded 722 times
Re: No fall dmg
Ir tipo norit pasakyt client_PreThink ir client_PostThink geriau nei Ham_TakeDamage ?
P.S. Gal koki tikrinima praleidau.
Code: Select all
#include <amxmodx>#include <hamsandwich> public plugin_init() { RegisterHam(Ham_TakeDamage, "player", "hook_TakeDamage")} public hook_TakeDamage(Victim, Inflictor, Attacker) { if(!Attacker && get_user_team(Victim) == 1) return HAM_SUPERCEDE return HAM_IGNORED}
- nuodas159
- Flooderis arba specialistas
- Posts: 522
- Joined: 2010 Sep 03 15:30
- Skype: nuodas159
- Location: SunCity
Re: No fall dmg
Delko neveikia? ta prasme nukritus ant zemes vistiek dmg nusijama??
Last edited by nuodas159 on 2012 Mar 13 14:50, edited 1 time in total.
-
- Jau po truputį tampa savu
- Posts: 109
- Joined: 2011 Dec 14 11:24
- Skype: ptaha525
- Location: Vilnius
- Contact:
Re: No fall dmg
tas kur as numeciau tikrinau t nenuema dmg i ct nuemanuodas159 wrote:Delko neveikia? ta prasme nukritus ant zemes vistiek dmg nusijama??
Code: Select all
public NoDamage_player ( id, victim, Float:flDamage, Float:fVecDir[ 3 ], tr, damage_type ){ if ( is_user_alive( id ) && iClass[ victim ] == 5 ) { if ( damage_type & DMG_FALL && get_pcvar_num( g_fall_damage ) ) { return HAM_SUPERCEDE; } } return HAM_IGNORED;}
Re: No fall dmg
Bet kodas durnas.ptaha525 wrote: tas kur as numeciau tikrinau t nenuema dmg i ct nuema
Code: Select all
#include <amxmodx>#include <hamsandwich>#include <cstrike>#include <hlsdk_const> public plugin_init() RegisterHam(Ham_TakeDamage, "player", "OnTakeDmg"); public OnTakeDmg(victim, inflictor, atker, Float:dmg, dmgType) return (dmgType == DMG_FALL && cs_get_user_team(victim) == CS_TEAM_T) ? HAM_SUPERCEDE : HAM_IGNORED;
Who is online
Users browsing this forum: No registered users and 3 guests