biohazard.inc
Original include source with line numbers.
| 1 | /* Biohazard functions |
| 2 | * |
| 3 | * by Cheap_Suit |
| 4 | * |
| 5 | * This file is provided as is (no warranties). |
| 6 | */ |
| 7 | |
| 8 | #if defined _biohazard_included |
| 9 | #endinput |
| 10 | #endif |
| 11 | #define _biohazard_included |
| 12 | |
| 13 | #pragma reqlib "biohazardf" |
| 14 | |
| 15 | /* Returns the mods status */ |
| 16 | stock is_biomod_active() |
| 17 | { |
| 18 | if(!cvar_exists("bh_enabled")) |
| 19 | { |
| 20 | log_amx("Cvar: ^"bh_enabled^" does not exist.") |
| 21 | return 0 |
| 22 | } |
| 23 | return get_cvar_num("bh_enabled") |
| 24 | } |
| 25 | |
| 26 | /* Called when a survivor is infected */ |
| 27 | forward event_infect(victim, attacker) |
| 28 | |
| 29 | /* Called when the game starts */ |
| 30 | forward event_gamestart() |
| 31 | |
| 32 | /* Returns true if the game has started */ |
| 33 | native bool:game_started() |
| 34 | |
| 35 | /* Makes a user zombie */ |
| 36 | native infect_user(victim, attacker) |
| 37 | |
| 38 | /* Makes a user human */ |
| 39 | native cure_user(index) |
| 40 | |
| 41 | /* Infect user before game starts */ |
| 42 | native preinfect_user(index, bool:yesno) |
| 43 | |
| 44 | /* Returns 1 if user is a zombie */ |
| 45 | native is_user_zombie(index) |
| 46 | |
| 47 | /* Returns 1 if the user is infected (before game)*/ |
| 48 | native is_user_infected(index) |
| 49 | |
| 50 | /* Returns user zombie class */ |
| 51 | native get_user_class(index) |
| 52 | |
| 53 | /* Returns zombie class id, -1 otherwise */ |
| 54 | native register_class(classname[], description[]) |
| 55 | |
| 56 | /* Sets zombie player model */ |
| 57 | native set_class_pmodel(classid, player_model[]) |
| 58 | |
| 59 | /* Sets zombie weapon model */ |
| 60 | native set_class_wmodel(classid, weapon_model[]) |
| 61 | |
| 62 | /* Returns zombie class id */ |
| 63 | native get_class_id(classname[]) |
| 64 | |
| 65 | #define DATA_HEALTH 0 //Health value |
| 66 | #define DATA_SPEED 1 //Speed value |
| 67 | #define DATA_GRAVITY 2 //Gravity multiplier |
| 68 | #define DATA_ATTACK 3 //Zombie damage multiplier |
| 69 | #define DATA_DEFENCE 4 //Bullet damage multiplier |
| 70 | #define DATA_HEDEFENCE 5 //HE damage multiplier |
| 71 | #define DATA_HITSPEED 6 //Pain speed multiplier |
| 72 | #define DATA_HITDELAY 7 //Pain speed delay value |
| 73 | #define DATA_REGENDLY 8 //Regeneration delay value |
| 74 | #define DATA_HITREGENDLY 9 //Pain regeneration delay value |
| 75 | #define DATA_KNOCKBACK 10 //Knockback multiplier |
| 76 | |
| 77 | /* Return/set value of zombie class data */ |
| 78 | native Float:get_class_data(classid, dataid) |
| 79 | native set_class_data(classid, dataid, Float:value) |