Основная информация
Проблема: Нужна помощь в изменении плагина
Ошибка:
Amx Mod X: ReAMXX
Билд:
ReGamedll:
Список модулей:
Список плагинов:
Список метамодулей:
Исходник:
Комментарий:
Здравствуйте. Сейчас плагин работает по такому принципу: ТТ постоянно видят ТТ не зависимо двигается тот или нет. Живые КТ видят ТТ в зависимости от их скорости. Если ТТ встает и не движется - он не видим для Живого КТ. Если Мертвый КТ, смотрит глазами Живого - то он видит ТТ не зависимо от движения. Помогите пожалуйста сделать так чтобы, Мертвые КТ глазами Живых, видели так же ТТ как и живые КТ.
Извиняйте за описание проблемы. Иначе обьяснить не мог)
Проблема: Нужна помощь в изменении плагина
Ошибка:
Дополнительная информацияМертвые КТ наблюдая за своими тимейтами видят ТТ
Amx Mod X: ReAMXX
Билд:
Код:
Не указан
ReGamedll:
Код:
Не указан
Список модулей:
Код:
Не указан
Список плагинов:
Код:
furiens.amxx
Список метамодулей:
Код:
Не указано
Исходник:
Код:
#include <amxmodx>
#include <cstrike>
#include <engine>
#include <fun>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
//#include <nvault>
#if AMXX_VERSION_NUM < 183
#include <dhudmessage>
#endif
#pragma tabsize 0
#include "Furien/furien.inc"
#define FURIEN_MAX_PLAYERS 32
#define IsPlayer(%1) (1 <= %1 <= FURIEN_MAX_PLAYERS)
#define IsWeaponBoxC4(%1) (get_pdata_cbase(%1, 39, 4) > 0)
#define MAX_USERS (FURIEN_MAX_PLAYERS + 1)
int const TEAM_TR = 1;
int const TEAM_CT = 2;
int FURIEN_TEAM;
int maxInvisSpeedingValue;
int Array:FurienSounds, Array:AntiFurienSounds, Array:ModelFurien, Array:ModelFurienVip, Array:ModelAnti, Array:ModelAntiVip, Array:DeathFurien, Array:DeathAnti,
Array:FurienPain, Array:AntiPain;
int bool:SWITCH_TEAM = true, bool:IS_SWITCHING_TEAM, bool:IS_RESTARTING, fr_tm_change_frwd, fr_found_restart_frwd,
PICK_UP_MODE = 2, PLANT_MODE = 2, HandleTextMsg, INVIS_FACKTOR = 4, furienKillMoney = 400, antiKillMoney = 400,
Float:furienGravity = 0.375, Float:maxSpeed = 500.0, Trie:dirEntities, HamHook:handle_ham_take_damage;
string descGameName[32];
string fr_user_models[2][MAX_USERS];
int all_teams[MAX_USERS];
int bool:us_fullpack_visibility[MAX_USERS] = {false, false, false, ...};
int us_fullpack_angle[MAX_USERS];
/*= NATIVES =*/
public plugin_natives() {
register_library("furien");
register_native("furien_get_user_team", "fr_get_user_team");
register_native("furien_get_InviseFactor", "get_invis_factor", 1);
register_native("furien_get_furien_teams", "get_furien_teams", 1);
register_native("furien_set_speed", "set_speed_team", 1); register_native("furien_update_speed", "set_speed_team", 1);// fix old version plugins
register_native("furien_get_gravity", "rlfurien_get_gravity", 1);
register_native("furien_get_max_speed", "get_max_speed", 1); register_native("furien_float_get_maxSpeed", "get_max_speed", 1);// fix old version plugins
register_native("furien_get_max_speed_team", "get_max_speed_team", 1);
register_native("furien_update_gravity", "nt_furien_update_gravity", 1);
register_native("furien_get_id_model", "native_furien_get_id_model", 1);
register_native("furien_set_id_model", "native_furien_set_id_model", 1);
}
public native_furien_get_id_model(id, type_team) return my_get_id_model(id, type_team);
public native_furien_set_id_model(id, type_team, value) return my_set_id_model(id, type_team, value);
public Float:rlfurien_get_gravity(id) {
if(FR_GetUserTeam(id) == Furien) return furienGravity;
return 1.0;
}
public nt_furien_update_gravity(id) {
set_user_gravity(id, rlfurien_get_gravity(id));
return true;
}
public get_invis_factor() return INVIS_FACKTOR;
public get_furien_teams() return FURIEN_TEAM;
public Float:get_max_speed() return maxSpeed;
public set_speed_team(id) check_max_speed(id);
public Float:get_max_speed_team(id) {
const m_pActiveItem = 373;
static Float:s; s = 240.0;
static ac; ac = get_pdata_cbase(id, m_pActiveItem);
if(ac != FM_NULLENT) ExecuteHamB(Ham_CS_Item_GetMaxSpeed, ac, s);
if(FR_GetUserTeam(id) == Furien) s = maxSpeed;
return s;
}
public lk_furien_get_blood_color(id) {
if(FR_GetUserTeam(id) == Furien) return 93;
return 77;
}
/* /= NATIVES =/ */
public plugin_precache() {
if(!load_configuration()) log_amx("[FurienMod] Configuration file doesn't exist !!");
}
/*= PLUGIN INIT =*/
static const VERSION[] = "1.3.2r";
set_default_values() {
arrayset(fr_user_models[AntiFurien], -1, MAX_USERS);
arrayset(fr_user_models[Furien], -1, MAX_USERS);
maxInvisSpeedingValue = INVIS_FACKTOR * 255;
HandleTextMsg = get_user_msgid("TextMsg");
}
public plugin_init() {
set_default_values();
register_plugin("Furien Mod", VERSION, "Gavrilyuc");
set_pcvar_string(register_cvar("furien_version", VERSION,
FCVAR_SERVER | FCVAR_EXTDLL | FCVAR_SPONLY), VERSION);
int HandleEntity;
register_dictionary("common.txt");
RegisterHam(Ham_Spawn, "player", "user_spawn", true);
RegisterHam(Ham_Item_PreFrame, "player", "check_max_speed", true);
register_forward(FM_EmitSound, "event_emitSound");
register_message(get_user_msgid("SendAudio"), "message_round_end");
HandleEntity = create_entity("info_target");
set_pev(HandleEntity, pev_classname, "check_speed");
set_pev(HandleEntity, pev_nextthink, get_gametime() + 0.1);
register_think("check_speed", "team_visibility_speed");
HandleEntity = create_entity("info_target");
set_pev(HandleEntity, pev_classname, "check_cvars");
set_pev(HandleEntity, pev_nextthink, get_gametime() + 10.0);
register_think("check_cvars", "check_user_cvars");
fr_tm_change_frwd = CreateMultiForward("furien_team_change", ET_IGNORE, FP_CELL);
register_event("TextMsg", "is_restarting", "a", "2&#Game_C", "2&#Game_w");
register_event("HLTV", "start_new_round", "a", "1=0", "2=0");
fr_found_restart_frwd = CreateMultiForward("furien_round_restart", ET_IGNORE);
register_event("DeathMsg", "Event_DeathMsg", "a");
if(get_cvar_float("sv_maxspeed") < maxSpeed) set_cvar_float("sv_maxspeed", maxSpeed);
dirEntities = TrieCreate();
TrieSetCell(dirEntities, "player_weaponstrip", 1);
TrieSetCell(dirEntities, "game_player_equip", 1);
TrieSetCell(dirEntities, "info_map_parameters", 1);
HandleEntity = create_entity("info_map_parameters");
DispatchKeyValue(HandleEntity, "buying", "3");
DispatchSpawn(HandleEntity);
register_event("TeamInfo", "team_change", "a");
register_forward(FM_AddToFullPack, "screen_drawing_full_pack", true);
}
/* /= PLUGIN INIT =/ */
public team_change() {
static id; id = read_data(1);
all_teams[id] = get_user_team(id);
}
static furien_win_message[256], anti_furien_message[256];
load_configuration() {
string szConfigFile[128];
get_localinfo("amxx_configsdir", szConfigFile, charsmax(szConfigFile))
format(szConfigFile, charsmax(szConfigFile), "%s/FurienMod/furien.ini", szConfigFile);
int fp = fopen(szConfigFile, "rt");
if(!fp) return 0;
string szDatas[96], szKey[32], szValue[64];
while(!feof(fp)) {
fgets(fp, szDatas, charsmax(szDatas));
trim(szDatas);
if(!szDatas[0] || szDatas[0] == ';' || szDatas[0] == '#' || (szDatas[0] == '/' && szDatas[1] == '/')) continue;
if(parse(szDatas, szKey, charsmax(szKey), szValue, charsmax(szValue)) < 2 || szValue[0] == 0) continue;
if(equal(szKey, "BOMB_PLANT")) {
PLANT_MODE = clamp(str_to_num(szValue), 1, 3);
if(PLANT_MODE != 3)
RegisterHam(Ham_AddPlayerItem, "player", "Player_AddPlayerItem");
}
else if(equal(szKey, "GAMENAME")) {
replace(szValue, charsmax(szValue), "%v", FURIEN_VERSION)
copy(descGameName, charsmax(descGameName), szValue)
register_forward(FM_GetGameDescription, "GetGameDescription")
}
else if(equal(szKey, "FURIEN_WIN")) copy(furien_win_message, charsmax(furien_win_message), szValue);
else if(equal(szKey, "ANTI_FURIEN_WIN")) copy(anti_furien_message, charsmax(anti_furien_message), szValue);
else if(equal(szKey, "GRAVITY")) furienGravity = floatclamp(str_to_float(szValue), 0.0125, 1.0);
else if(equal(szKey, "HOSTAGE_REMOVE") && str_to_num(szValue)) RegisterHam(Ham_Spawn, "hostage_entity", "Hostage_Spawn");
else if(equal(szKey, "INVIS_FACTOR")) INVIS_FACKTOR = clamp(str_to_num(szValue), 1, 4);
else if(equal(szKey, "KILL_ANTI_REWARD")) antiKillMoney = str_to_num(szValue);
else if(equal(szKey, "KILL_FURIEN_REWARD")) furienKillMoney = str_to_num(szValue);
else if(equal(szKey, "MAXSPEED")) maxSpeed = floatclamp(str_to_float(szValue), 100.0, 2000.0);
else if(equal(szKey, "PICK_UP")) {
PICK_UP_MODE = clamp(str_to_num(szValue), 1, 3);
if(PICK_UP_MODE != 3) {
RegisterHam(Ham_Touch, "weaponbox", "CWeaponBox_Touch")
RegisterHam(Ham_Touch, "armoury_entity", "GroundWeapon_Touch")
RegisterHam(Ham_Touch, "weapon_shield", "GroundWeapon_Touch")
}
}
else if(equal(szKey, "TEAM_START_FURIEN")) {
new v = clamp(str_to_num(szValue), 1, 3);
FURIEN_TEAM = v == 3 ? random_num(1, 2) : v;
}
else if(equal(szKey, "SWITCH_TEAMS")) {
SWITCH_TEAM = !!clamp(str_to_num(szValue), 0, 1);
if(SWITCH_TEAM) {
handle_ham_take_damage = RegisterHam(Ham_TakeDamage, "player", "Player_TakeDamage");
DisableHamForward(handle_ham_take_damage);
}
}
}
fclose(fp);
get_localinfo("amxx_configsdir", szConfigFile, charsmax(szConfigFile));
format(szConfigFile, charsmax(szConfigFile), "%s/FurienMod/furien_mod.ini", szConfigFile);
load_sounds(szConfigFile);
return 1
}
load_sounds(file_name[128]) {
if(!file_exists(file_name)) return;
AntiFurienSounds = ArrayCreate(128);
FurienSounds = ArrayCreate(128);
ModelFurien = ArrayCreate(128);
ModelFurienVip = ArrayCreate(128);
ModelAnti = ArrayCreate(128);
ModelAntiVip = ArrayCreate(128);
DeathAnti = ArrayCreate(128);
DeathFurien = ArrayCreate(128);
FurienPain = ArrayCreate(128);
AntiPain = ArrayCreate(128);
static file; file = fopen(file_name, "rt");
static linedata[3348], key[256], value[3000];
while (file && !feof(file)) {
fgets(file, linedata, charsmax(linedata));
replace(linedata, charsmax(linedata), "^n", "")
if(!linedata[0] || linedata[0] == ';') continue;
strtok(linedata, key, charsmax(key), value, charsmax(value), '=');
trim(key);
trim(value);
if(equal(key, "WIN_SOUND_ANTI")) {
while(value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ',')) {
trim(key);
trim(value);
add_string(AntiFurienSounds, key);
precache_sound(key);
}
}
else if(equal(key, "WIN_SOUND_FURIEN")) {
while(value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ',')) {
trim(key);
trim(value);
add_string(FurienSounds, key);
precache_sound(key);
}
}
else if(equal(key, "FURIEN_MODEL")) {
while(value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ',')) {
trim(key);
trim(value);
add_string(ModelFurien, key);
precache_user_model(key);
}
}
else if(equal(key, "FURIEN_MODEL_VIP")) {
while(value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ',')) {
trim(key);
trim(value);
add_string(ModelFurienVip, key);
precache_user_model(key);
}
}
else if(equal(key, "ANTI_MODEL")) {
while(value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ',')) {
trim(key);
trim(value);
add_string(ModelAnti, key);
precache_user_model(key);
}
}
else if(equal(key, "ANTI_MODEL_VIP")) {
while(value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ',')) {
trim(key);
trim(value);
add_string(ModelAntiVip, key);
precache_user_model(key);
}
}
else if(equal(key, "FURIEN_DEATH")) {
while(value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ',')) {
trim(key);
trim(value);
add_string(DeathFurien, key);
precache_sound(key);
}
}
else if(equal(key, "ANTI_DEATH")) {
while(value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ',')) {
trim(key);
trim(value);
add_string(DeathAnti, key);
precache_sound(key);
}
}
else if(equal(key, "FURIEN_PAIN")) {
while(value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ',')) {
trim(key);
trim(value);
add_string(FurienPain, key);
precache_sound(key);
}
}
else if(equal(key, "ANTI_PAIN")) {
while(value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ',')) {
trim(key);
trim(value);
add_string(AntiPain, key);
precache_sound(key);
}
}
}
if (file) fclose(file);
}
public event_emitSound(id, channel, const sample[], Float:volume, Float:attn, flags, pitch) {
if(!is_user_connected(id)) return FMRES_IGNORED;
static sound[256]; sound[0] = 0;
/* Furien & Aliance Death */
if((sample[7] == 'd' && ((sample[8] == 'i' && sample[9] == 'e') || (sample[8] == 'e' && sample[9] == 'a')))) {
if(FR_GetUserTeam(id) == Furien && ArraySize(DeathFurien) >= 1)
ArrayGetString(DeathFurien, random_num(0, ArraySize(DeathFurien) - 1), sound, charsmax(sound));
else if(FR_GetUserTeam(id) == AntiFurien && ArraySize(DeathAnti) >= 1)
ArrayGetString(DeathAnti, random_num(0, ArraySize(DeathAnti) - 1), sound, charsmax(sound));
if(sound[0]) {
emit_sound(id, channel, sound, volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}
/* Pain & give Damage */
else if(sample[7] == 'b' && sample[8] == 'h' && sample[9] == 'i' && sample[10] == 't') {
if(FR_GetUserTeam(id) == Furien && ArraySize(FurienPain) >= 1)
ArrayGetString(FurienPain, random_num(0, ArraySize(FurienPain) - 1), sound, charsmax(sound));
else if(FR_GetUserTeam(id) == AntiFurien && ArraySize(AntiPain) >= 1)
ArrayGetString(AntiPain, random_num(0, ArraySize(AntiPain) - 1), sound, charsmax(sound));
if(sound[0]) {
emit_sound(id, channel, sound, volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}
return FMRES_IGNORED;
}
public GetGameDescription() {
forward_return(FMV_STRING, descGameName);
return FMRES_SUPERCEDE;
}
public is_restarting() IS_RESTARTING = true;
public start_new_round() {
if(IS_RESTARTING) {
IS_RESTARTING = false;
int iRet;
ExecuteForward(fr_found_restart_frwd, iRet);
}
if(IS_SWITCHING_TEAM) {
IS_SWITCHING_TEAM = false;
DisableHamForward(handle_ham_take_damage);
}
}
public GroundWeapon_Touch(iWeapon, id) {
if (!IsPlayer(id)) {
return HAM_IGNORED;
}
if (!PICK_UP_MODE) {
remove_entity(iWeapon);
return HAM_SUPERCEDE;
}
if (!is_user_alive(id)) {
return HAM_SUPERCEDE;
}
int usTeam = FR_GetUserTeam(id);
if ((usTeam == -1) || (usTeam == Furien && PICK_UP_MODE != 1)
|| (usTeam == AntiFurien && PICK_UP_MODE != 2))
{
return HAM_SUPERCEDE;
}
return HAM_IGNORED;
}
public CWeaponBox_Touch(iWeaponBox, id) {
if (!IsPlayer(id)) {
return HAM_IGNORED;
}
if (!is_user_alive(id)) {
return HAM_SUPERCEDE;
}
if (IsWeaponBoxC4(iWeaponBox)) {
return HAM_IGNORED;
}
if (!PICK_UP_MODE) {
remove_entity(iWeaponBox);
return HAM_SUPERCEDE;
}
int usTeam = FR_GetUserTeam(id);
if((usTeam == -1) || (usTeam == Furien && PICK_UP_MODE != 1)
|| (usTeam == AntiFurien && PICK_UP_MODE != 2))
{
return HAM_SUPERCEDE;
}
return HAM_IGNORED
}
public pfn_keyvalue(HandleEntity) {
if(dirEntities) {
string szClassName[32], szCrap[2];
copy_keyvalue(szClassName, charsmax(szClassName), szCrap,
charsmax(szCrap), szCrap, charsmax(szCrap));
if(TrieKeyExists(dirEntities, szClassName)) {
remove_entity(HandleEntity);
return PLUGIN_HANDLED;
}
}
return PLUGIN_CONTINUE;
}
public plugin_cfg() {
if(dirEntities) {
TrieDestroy(dirEntities);
set_cvar_float("sv_restart", 1.0);
}
}
public fr_get_user_team() {
static id; id = get_param(1);
if(!is_user_connected(id) || !pev_valid(id) || !is_valid_ent(id)) return -1;
return FR_GetUserTeam(id);
}
FR_GetUserTeam(id) {
if (!is_user_connected(id) || !pev_valid(id) || !is_valid_ent(id)) return -1;
if (all_teams[id] == FURIEN_TEAM) return Furien;
return AntiFurien;
}
public client_connect(id) {
if(!is_user_bot(id)) query_client_cvar(id, "gl_clear", "Client_Cvar_Result");
}
public Client_Cvar_Result(id, const szCvar[], const szValue[]) {
if(szValue[0] == 'B') {
server_cmd("kick #%d '%L'", id, "ERROR_SOFWARE", get_user_userid(id));
}
}
new IsVip[33];
public user_spawn(id)
{
if(is_user_alive(id))
{
strip_user_weapons(id);
new this_user_team = FR_GetUserTeam(id);
IsVip[id] = (get_user_flags(id) & ADMIN_LEVEL_C) ? true : false;
switch(this_user_team)
{
case Furien:
{
set_user_gravity(id, furienGravity);// Enable: "Furien Gravity"
set_user_footsteps(id, 1);// Disable: footsteps
furien_set_model(id, this_user_team, IsVip[id] ? ModelFurienVip : ModelFurien);// set model
}
case AntiFurien:
{
set_user_footsteps(id, 0);// Enable: footsteps
set_user_gravity(id, 1.0);// Disable: "Furien Gravity"
furien_set_model(id, this_user_team, IsVip[id] ? ModelAntiVip : ModelAnti);// set model
}
}
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0);// delete user invis-factor...
us_fullpack_angle[id] = 255;
us_fullpack_visibility[id] = false;
}
}
public check_max_speed(id) {
if(is_user_alive(id) && FR_GetUserTeam(id) == Furien && get_user_maxspeed(id) != 1.0)
set_pev(id, pev_maxspeed, maxSpeed);
}
public team_visibility_speed(HandleEntity) {
static l[32], len, Float:fVecVelocity[3], speed;
entity_set_float(HandleEntity, EV_FL_nextthink, get_gametime() + 0.1);
get_players(l, len, "ae", FURIEN_TEAM == TEAM_TR ? "TERRORIST" : "CT");
for(int i; i < len; i++) {
if(get_user_weapon(l) == CSW_KNIFE) {
entity_get_vector(l, EV_VEC_velocity, fVecVelocity);
speed = floatround(vector_length(fVecVelocity));
if(speed < maxInvisSpeedingValue) {
speed = speed / INVIS_FACKTOR;
//set_user_rendering(l, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, speed);
us_fullpack_angle[l] = speed;
us_fullpack_visibility[l] = bool:(speed < 3);
}
else {// disable alpha blend
//set_user_rendering(l, kRenderFxNone, 0, 0, 0, kRenderNormal, 0);
us_fullpack_angle[l] = 255;
us_fullpack_visibility[l] = false;
}
} else {// disable alpha blend if not weapon knife.
//set_user_rendering(l, kRenderFxNone, 0, 0, 0, kRenderNormal, 0);
us_fullpack_angle[l] = 255;
us_fullpack_visibility[l] = false;
}
}
}
public screen_drawing_full_pack(es, e , ent, id, hostflags, player, pSet) {
if(player && is_user_alive(id) && is_user_alive(ent) && (FR_GetUserTeam(id) != FR_GetUserTeam(ent))) {
//static bool:hasTeam; hasTeam = bool:(FR_GetUserTeam(id) == FR_GetUserTeam(ent));
set_es(es, ES_RenderMode, kRenderTransAlpha);
//set_es(es, ES_RenderAmt, hasTeam ? 255 : us_fullpack_angle[ent]);
set_es(es, ES_RenderAmt, us_fullpack_angle[ent]);
if (us_fullpack_visibility[ent] && FR_GetUserTeam(id) != FR_GetUserTeam(ent))
set_es(es, ES_Effects, get_es(es, ES_Effects) | EF_NODRAW);
}
return FMRES_IGNORED;
}
/*= Furien Team Changer & Sound Win Play =*/
public message_round_end(iMsgId, iMsgDest, id) {
if(id) return;
static sound[128], szSound[14], bool:bAntiWins, bool:bSwitchTeams;
get_msg_arg_string(2, szSound, charsmax(szSound));
if(equal(szSound, "%!MRAD_ctwin")) {
if(FURIEN_TEAM == TEAM_TR) {
if(SWITCH_TEAM) {
bSwitchTeams = true;
FURIEN_TEAM = TEAM_CT;
}
bAntiWins = true;
}
} else if(equal(szSound, "%!MRAD_terwin")) {
if(FURIEN_TEAM == TEAM_CT) {
if(SWITCH_TEAM) {
bSwitchTeams = true;
FURIEN_TEAM = TEAM_TR;
}
bAntiWins = true;
}
} else return;
if(get_msg_block(HandleTextMsg) == BLOCK_NOT) set_msg_block(HandleTextMsg, BLOCK_ONCE);
if(bAntiWins) {
if(ArraySize(AntiFurienSounds) >= 1) {// Play sound Win Aliance
GetAntiSound(sound);
set_msg_arg_string(2, sound);
}
if(bSwitchTeams) {// Execute Function: "Furien Team Change"
int iRet;
ExecuteForward(fr_tm_change_frwd, iRet, FURIEN_TEAM);
IS_SWITCHING_TEAM = true;
EnableHamForward(handle_ham_take_damage);// Enable Blocking Damage.
}
} else {
if(ArraySize(FurienSounds) >= 1) {// Play sound Win Furien
GetFurienSound(sound);
set_msg_arg_string(2, sound);
}
}
win_message(bAntiWins);// go Win Message
}
void win_message(is_win) {
static i, iPlayers[32], iNum, iPlayer; i = 0;
get_players(iPlayers, iNum, "ch");
if(is_win) {
for(; i < iNum; i++) {
if(is_user_connected(i)) continue;
iPlayer = iPlayers;
set_dhudmessage(0, 255, 0, -1.0, 0.1, 1, 1.0, 15.0, _, _);
show_dhudmessage(iPlayer, anti_furien_message);
}
} else {
for(; i < iNum; i++) {
if(is_user_connected(i)) continue;
iPlayer = iPlayers;
set_dhudmessage(255, 0, 0, -1.0, 0.1, 1, 1.0, 15.0, _, _);
show_dhudmessage(iPlayer, furien_win_message);
}
}
}
/*= Set Money Kill User's =*/
public Event_DeathMsg() {
int iKiller = read_data(1);
if (IsPlayer(iKiller) && is_user_connected(iKiller)) {
int iVictim = read_data(2);
if(iVictim != iKiller) {
int iVicTimTeam = FR_GetUserTeam(iVictim);
if (FR_GetUserTeam(iKiller) == iVicTimTeam) {
SetCredits(iKiller,
GetCredits(iKiller) - ((iVicTimTeam == Furien ? furienKillMoney : antiKillMoney) * 2));
} else {
SetCredits(iKiller, GetCredits(iKiller) + (iVicTimTeam == Furien ? furienKillMoney : antiKillMoney));
}
}
}
}
/*= Furien Checker: "Pick Up Weapons" =*/
public Player_AddPlayerItem(id , iWeapon) {
if(ExecuteHam(Ham_Item_GetWeaponPtr, iWeapon) != iWeapon || cs_get_weapon_id(iWeapon) != CSW_C4
|| PLANT_MODE & FR_GetUserTeam(id)) {
return HAM_IGNORED;
}
set_pev(iWeapon, pev_flags, pev(iWeapon, pev_flags) | FL_KILLME);
cs_set_user_plant(id, 0);
set_pev(id, pev_body, 0);
SetHamReturnInteger(0);
return HAM_SUPERCEDE;
}
public Hostage_Spawn(iHostage) {
remove_entity(iHostage);
return HAM_SUPERCEDE;
}
public Player_TakeDamage() return HAM_SUPERCEDE;
void add_string(Array:Ar, s[]) {
ArrayPushString(Ar, s);
return ArraySize(Ar) - 1;
}
void GetFurienSound(sound[128]) ArrayGetString(FurienSounds, random_num(0, ArraySize(FurienSounds)-1), sound, 128);
void GetAntiSound(sound[128]) ArrayGetString(AntiFurienSounds, random_num(0, ArraySize(AntiFurienSounds)-1), sound, 128);
void precache_user_model(const s[]) {
static zek_P[65];
format (zek_P,64,"models/player/%s/%s%s",s, s,".mdl");
precache_model(zek_P);
}
void furien_set_model(id, type_team, Array:Ar) {
//static usname[64]; get_user_name(id, usname, sizeof(usname));
//server_print("[DEBUG] `%s` `%s` Set Model Function {", usname, type_team == Furien ? "FURIEN" : "ANTI_FURIEN");
static f; f = my_get_id_model(id, type_team);
//server_print("[DEBUG] Get Model ID: %d", f);
if(ArraySize(Ar) <= 0) {
if(f >= 0) my_set_id_model(id, type_team, -1);
cs_reset_player_model(id);
return;
}
//server_print("[DEBUG] Current Size > 0");
if(f == -1) {
//server_print("[DEBUG] Model ID = -1 SET RANDOM MODEL ID");
my_set_id_model(id, type_team, random_num(0, ArraySize(Ar) - 1));
f = my_get_id_model(id, type_team);
//server_print("[DEBUG] Model ID: %d", f);
}
if(f >= 0) {
static tmp[128];
ArrayGetString(Ar, f, tmp, 128);
cs_set_player_model(id, tmp);
//server_print("[DEBUG] Set Model `%s` !!!!", tmp);
}
//server_print("[DEBUG] } Set Model Function END");
}
void my_set_id_model(id, type_team, value) {
if(Furien <= type_team <= AntiFurien) {
if(IsPlayer(id)) {
fr_user_models[type_team][id] = value;
return true;
}
}
return false;
}
void my_get_id_model(id, type_team) {
if(fr_user_models[type_team][id] >= 0) return fr_user_models[type_team][id];
return -1;
}
Комментарий:
Здравствуйте. Сейчас плагин работает по такому принципу: ТТ постоянно видят ТТ не зависимо двигается тот или нет. Живые КТ видят ТТ в зависимости от их скорости. Если ТТ встает и не движется - он не видим для Живого КТ. Если Мертвый КТ, смотрит глазами Живого - то он видит ТТ не зависимо от движения. Помогите пожалуйста сделать так чтобы, Мертвые КТ глазами Живых, видели так же ТТ как и живые КТ.
Извиняйте за описание проблемы. Иначе обьяснить не мог)
В этой теме было размещено решение! Перейти к решению.
Вложения
-
22.7 KB Просмотры: 700