#include <amxmodx> #include <hamsandwich> #include <codmod> #include <engine> #define DMG_BULLET (1<<1) new const nazwa[] = "Skoczek"; new const opis[] = "Zmniejszona grawitacja,1/2 na natychmiastowe zabicie z HE."; new const bronie = 1<<CSW_AK47 | 1<<CSW_Hegrenade; new const zdrowie = 10; new const kondycja = 30; new const inteligencja = 6; new const wytrzymalosc = 10; public plugin_init() RegisterHam(Ham_TakeDamage, "player", "TakeDamage"); public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits) { if(!is_user_connected(idattacker)) return HAM_IGNORED; if(!ma_perk[idattacker]) return HAM_IGNORED; if(get_user_team(this) != get_user_team(idattacker) && get_user_weapon(idattacker) == CSW_HEGRENADE && damagebits & DMG_BULLET && random_num(1, 2) == 1) cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits); return HAM_IGNORED; } register_event("ResetHUD", "ResetHUD", "abe"); } public cod_class_enabled(id) { entity_set_float(id, EV_FL_gravity, 200.0/800.0); ma_klase[id] = true; } public cod_class_disabled(id) { entity_set_float(id, EV_FL_gravity, 800.0/800.0); ma_klase[id] = false; } public ResetHUD(id) { if(ma_klase[id]) entity_set_float(id, EV_FL_gravity, 200.0/800.0); }
Oto błędy kompilacji:
Welcome to the AMX Mod X 1.8.1-300 Compiler. Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team Skoczek.sma(26) : error 017: undefined symbol "ma_perk" Skoczek.sma(26) : warning 215: expression has no effect Skoczek.sma(26) : error 001: expected token: ";", but found "]" Skoczek.sma(26) : error 029: invalid expression, assumed zero Skoczek.sma(26) : fatal error 107: too many error messages on one line Compilation aborted. 4 Errors.