Custom Binds - don't apply

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
15
Реакции
4
Ошибка
If I apply only Custom Binds (ex. bind v +setlaser), when I enter the server the binder don't appply. If I apply first the Default Binds (rewrite all player's binds with CS1.6 defaults) after that the Custom Binds it works.

TL-DR:
Custom Binds = off; Default Binds= on - Connect on server -> Nothing binded
Custom Binds = off; Default Binds= on - Connect on server -> Apply Default Binds -> Apply Custom Binds
ОС
Windows
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.4.0.639-dev
Build date: 17:47:13 Feb 21 2018 (1411)
Build from: https://github.com/dreamstalker/rehlds/commit/822df9a
ReGamedll
ReGameDLL version: 5.7.0.295-dev
Build date: 15:10:22 Feb 19 2018
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/aa329db
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] Reunion RUN - reunion_mm.dll v0.1.0.92 ini Start Never
[ 2] ReAuthCheck RUN - reauthcheck_mm.dll v0.1.6 ini Start Never
[ 3] Rechecker RUN - rechecker_mm.dll v2.5 ini Chlvl ANY
[ 4] Revoice RUN - revoice_mm.dll v0.1.0.32 ini Start Never
[ 5] SafeNameAndChat RUN - safenameandchat.dll v1.2 Beta ini ANY ANY
[ 6] AMX Mod X RUN - amxmodx_mm.dll v1.8.3-dev+5151 ini Start ANY
[ 7] WHBlocker RUN - whblocker_mm.dll v1.5.695 ini Chlvl ANY
[ 8] Yet Another POD-Bot RUN - yapb.dll v2.8 ini Chlvl ANY
[ 9] CSX RUN - csx_amxx.dll v1.8.3-dev+5151 pl6 ANY ANY
[10] Ham Sandwich RUN - hamsandwich_amxx.dll v1.8.3-dev+5151 pl6 ANY ANY
[11] FakeMeta RUN - fakemeta_amxx.dll v1.8.3-dev+5151 pl6 ANY ANY
[12] ReAPI RUN - reapi_amxx.dll v5.5.0.150-dev pl6 ANY Never
[13] Engine RUN - engine_amxx.dll v1.8.3-dev+5151 pl6 ANY ANY
[14] CStrike RUN - cstrike_amxx.dll v1.8.3-dev+5151 pl6 ANY ANY
[15] Fun RUN - fun_amxx.dll v1.8.3-dev+5151 pl6 ANY ANY
[16] MySQL RUN - mysql_amxx.dll v1.8.3-dev+5151 pl6 ANY ANY
[17] GeoIP RUN - geoip_amxx.dll v1.8.3-dev+5151 pl6 ANY ANY
17 plugins, 17 running
Список плагинов
[  1] Admin Base              1.8.3-dev+  AMXX Dev Team     admin.amxx       running
[ 2] Admin Commands 1.8.3-dev+ AMXX Dev Team admincmd.amxx running
[ 3] Admin Help 1.8.3-dev+ AMXX Dev Team adminhelp.amxx running
[ 4] Slots Reservation 1.8.3-dev+ AMXX Dev Team adminslots.amxx running
[ 5] Menus Front-End 1.8.3-dev+ AMXX Dev Team menufront.amxx running
[ 6] Commands Menu 1.8.3-dev+ AMXX Dev Team cmdmenu.amxx running
[ 7] Players Menu 1.8.3-dev+ AMXX Dev Team plmenu_ab_base. running
[ 8] Maps Menu 1.8.3-dev+ AMXX Dev Team mapsmenu.amxx running
[ 9] Plugin Menu 1.8.3-dev+ AMXX Dev Team pluginmenu.amxx running
[ 10] Anti Flood 1.8.3-dev+ AMXX Dev Team antiflood.amxx running
[ 11] Admin Votes 1.8.3-dev+ AMXX Dev Team adminvote_ab_ba running
[ 12] Stats Configuration 1.8.3-dev+ AMXX Dev Team statscfg.amxx running
[ 13] AES: StatsX 0.5 Vega serfreeman1337 statsx_aes.amxx running
[ 14] StatsX 1.8.3-dev+ AMXX Dev Team statsx.amxx running
[ 15] Accuracy Fix 3.0 Numb accuracy_fix.am running
[ 16] Autoresponder/Advertis 0.5.1 MaximusBrood ad_manager.amxx running
[ 17] Admin Auto Remove 1.0 RevCrew admin_auto_remo running
[ 18] Admin Chat 3.1 OciXCrom admin_chat_impr running
[ 19] Admin Groups 1.1 OciXCrom admin_groups.am running
[ 20] Admin Trail 2.0 Jack admin_trail.amx running
[ 21] Advanced Bans 0.8.1 Exolent advanced_bans.a running
[ 22] Advanced Client Checke 0.3.4 Mistrick advanced_client running
[ 23] Advanced Mute 2.1 OciXCrom advanced_mute.a running
[ 24] [ReAPI] Advanced Team 0.1.0 Vaqtincha advanced_team_c running
[ 25] AFK Control 1.4.1 [Rnd neygomon afk_control.amx running
[ 26] Anti Fast Silencer 0.0.4 ConnorMcLeod anti_fast_silen running
[ 27] Anti FlashLight Spam 1.3 Leo_[BH] anti_flashlight running
[ 28] Auto Restart 1.4 vato loco [GE-S] auto_restart.am running
[ 29] Best Player MOTD 1.2.1 OciXCrom best_player_mot running
[ 30] Block HudTextArgs 1.0 ConnorMcLeod block_hudtextar running
[ 31] Block Kill Command 1.1 SkillartzHD block_kill_comm running
[ 32] Block Use Sound 1.0 OciXCrom block_use_sound running
[ 33] Boost Fix 1.0 Numb boost_fix.amxx running
[ 34] Break Message 1.2 Raheem break_message.a running
[ 35] Breakable Hint 1.1 Raheem breakable_hint. running
[ 36] Bubble Trails 0.0.1 ConnorMcLeod bubble_trails.a running
[ 37] Camera View 0.0.2 ConnorMcLeod camera_view.amx running
[ 38] Client Exec Steam 1.1 Raheem client_exec_ste running
[ 39] Command Targeting Plus 1.3 OciXCrom cmd_target_plus running
[ 40] Command Restrictions 1.2 OciXCrom command_restric running
[ 41] Custom Flashlight 0.5.4 ConnorMcLeod custom_flash_li running
[ 42] DeathMsg Fix 1.0.3 Simon Logic death_msg_fix.a running
[ 43] Destroy Steam 1.1 Raheem, ArminC destroy_steam.a running
[ 44] Damage Sound Bug Fix 1.0 Simo123 dmg_sound_bug_f running
[ 45] Drop Pistols on Death 0.0.4 Vaqtincha drop_pistols_on running
[ 46] Fail Spawns Protector 1.2 zmd94 fail_spawn_prot running
[ 47] Fast Knife 1.0 OciXCrom fast_knife.amxx running
[ 48] Ultimate Fire in the H 2.0 OciXCrom fire_in_the_hol running
[ 49] First Person Death 1.1 Numb first_person_de running
[ 50] [ReAPI] AimEspFix VIP 1.0 ? fix_vip_tab_for running
[ 51] FPS.Meter 1.0 raggy fps_meter.amxx running
[ 52] Free Look Crosshair Fi 1.2 Numb free_look_cross running
[ 53] Pushable Object Respaw 1.4 Numb func_pushable_r running
[ 54] Pushable Object Speed 1.0 Numb func_pushable_s running
[ 55] Vehicle Object Respawn 1.0 xPaw func_vehicle_re running
[ 56] Gag 1.5.0 xPaw & Exolent gag.amxx running
[ 57] Galileo v5.8.1-918 Brad Jones/Addon galileo.amxx running
[ 58] Gametracker: Player Pa 2.0 OciXCrom game_tracker.am running
[ 59] Gib Death 2.2 <VeCo> gib_death.amxx running
[ 60] Glock/Famas Anti 4 Bul 0.0.2 ConnorMcLeod glock_famas_ant running
[ 61] GoSpec 1.2 OciXCrom go_spec.amxx running
[ 62] Hostname Timeleft 1.0 xPaw host_name_time_ running
[ 63] Invisible Spectator 1.0 ReHLDS Team invisible_spect running
[ 64] Ultimate IP Shower 2.0 OciXCrom ip_shower.amxx running
[ 65] Kevlar pickup fix 1.0 xPaw kevlar_pickup_f running
[ 66] KGB Bots 2.3 OvidiuS & Desika kgb_bots.amxx running
[ 67] Kick Spamers 1.0.3c gyxoBka kick_spamers.am running
[ 68] Kill Assist 1.0 Xelson, PRoSToTe kill_assist.amx running
[ 69] Land Reality 1.3 OT land_reality.am running
[ 70] Let it Snow! 1.0 OciXCrom let_it_snow.amx running
[ 71] Lie Flat 1.2 Nomexous lie_flat.amxx running
[ 72] Loading Music II 1.2.9 Simon Logic loading_music2. running
[ 73] AMXX Unstuck 1.7.3 AMXX Dev Builder manual_unstuck. running
[ 74] MapConfigX 1.1 AdaskoMX map_config_x.am running
[ 75] MOTD Commands 1.2 OciXCrom motd_commands.a running
[ 76] Multiple Game Names 1.0 mforce multiple_game_n running
[ 77] NadeModes 11.2 Nomexous & OT nade_modes.amxx running
[ 78] No Block 1.0 Raheem no_block.amxx running
[ 79] No Radio Flood 1.1 Starsailor no_radio_flood. running
[ 80] No-Retry 1.0 Angel in the dar no_retry.amxx running
[ 81] Non-sprite set to glow 1.0 xPaw non_sprite_glow running
[ 82] NoSeeVar 3.0 Zetex nsv.amxx running
[ 83] Ping Control 1.31 neygomon ping_control.am running
[ 84] Precache Management 1.0.0 ConnorMcLeod precache_manage stopped
[ 85] Radar scanner 1.1 ko2 radar_scanner.a running
[ 86] Real Armor 1.1 Numb real_armor.amxx running
[ 87] Real Weapon Speed 1.0 Numb real_weapon_spe running
[ 88] ReChecker Log 0.1 F@nt0M rechecker_log.a running
[ 89] Reload Animation Fix 1.1 Numb reload_animatio running
[ 90] Reset Buttons 1.3 xPaw reset_buttons.a paused
[ 91] Reset Score 1.2 Raheem reset_score.amx running
[ 92] Retry in same team 1.1b VEN & Hades Owna retry_same_team running
[ 93] Server FPS Auto Meter 1.1 neygomon server_fps_auto running
[ 94] Server's Map Informati 2.1.1 Ulquiorra server_map_info running
[ 95] Spawn Health Bug Fix 2.0 claudiuhks spawn_health_bu running
[ 96] Spec Recoil Fix 1.0 Numb spec_recoil_fix running
[ 97] Spray bug fix 1.1 Simo123 spray_bug_fix.a running
[ 98] Stats Auto Reset 1.0 Leo_[BH] stats_auto_rese running
[ 99] Target Info on HUD 1.2 Sylwester target_info.amx running
[100] Toggle-Plats Respawn F 1.0 xPaw toggle_plats_re running
[101] Vehicle Knife Sound Fi 1.0 KayDee vehicle_knife_s running
[102] Water Fall Damage 0.10 Avalanche water_fall_dama running
[103] Weapon Icon 1.2 hoboman313/Zenix weapon_icon.amx running
[104] Whose The Weapon 2.1 Yek'-ta whose_the_weapo running
[105] Win Messages & Sounds 2.1 OciXCrom win_messages.am running
[106] Zero (0) HP Bug Fix 0.4 Exolent zero_hp_fix.amx running
[107] Chat Manager 3.6.6 OciXCrom zz_chat_manager running
[108] Invisible Chat Command 1.0.0 Ruslan A. zzz_hide_slash_ running
Исходный код
#include <amxmodx>
#include <amxmisc>
#include <reapi>

new const g_szDefaultBinds[][] =
{
"bind ^"TAB^" ^"+showscores^"",
"bind ^"ENTER^" ^"+attack^"",
"bind ^"ESCAPE^" ^"cancelselect^"",
"bind ^"SPACE^" ^"+jump^"",
"bind ^"'^" ^"+moveup^"",
"bind ^"+^" ^"sizeup^"",
"bind ^",^" ^"buyammo1^"",
"bind ^"-^" ^"sizedown^"",
"bind ^".^" ^"buyammo2^"",
"bind ^"/^" ^"+movedown^"",
"bind ^"0^" ^"slot10^"",
"bind ^"1^" ^"slot1^"",
"bind ^"2^" ^"slot2^"",
"bind ^"3^" ^"slot3^"",
"bind ^"4^" ^"slot4^"",
"bind ^"5^" ^"slot5^"",
"bind ^"6^" ^"slot6^"",
"bind ^"7^" ^"slot7^"",
"bind ^"8^" ^"slot8^"",
"bind ^"9^" ^"slot9^"",
"bind ^";^" ^"+mlook^"",
"bind ^"=^" ^"sizeup^"",
"bind ^"[^" ^"invprev^"",
"bind ^"]^" ^"invnext^"",
"bind ^"`^" ^"toggleconsole^"",
"bind ^"a^" ^"+moveleft^"",
"bind ^"b^" ^"buy^"",
"bind ^"c^" ^"radio3^"",
"bind ^"d^" ^"+moveright^"",
"bind ^"e^" ^"+use^"",
"bind ^"f^" ^"impulse 100^"",
"bind ^"g^" ^"drop^"",
"bind ^"h^" ^"+commandmenu^"",
"bind ^"j^" ^"cheer^"",
"bind ^"k^" ^"+voicerecord^"",
"bind ^"l^" ^"showbriefing^"",
"bind ^"m^" ^"chooseteam^"",
"bind ^"n^" ^"nightvision^"",
"bind ^"o^" ^"buyequip^"",
"bind ^"q^" ^"lastinv^"",
"bind ^"r^" ^"+reload^"",
"bind ^"s^" ^"+back^"",
"bind ^"t^" ^"impulse 201^"",
"bind ^"u^" ^"messagemode2^"",
"bind ^"v^" ^"+moveup^"",
"bind ^"w^" ^"+forward^"",
"bind ^"x^" ^"radio2^"",
"bind ^"y^" ^"messagemode^"",
"bind ^"z^" ^"radio1^"",
"bind ^"~^" ^"toggleconsole^"",
"bind ^"UPARROW^" ^"+forward^"",
"bind ^"DOWNARROW^" ^"+back^"",
"bind ^"LEFTARROW^" ^"+left^"",
"bind ^"RIGHTARROW^" ^"+right^"",
"bind ^"ALT^" ^"+strafe^"",
"bind ^"CTRL^" ^"+duck^"",
"bind ^"SHIFT^" ^"+speed^"",
"bind ^"F1^" ^"autobuy^"",
"bind ^"F2^" ^"rebuy^"",
"bind ^"F5^" ^"snapshot^"",
"bind ^"F6^" ^"save quick^"",
"bind ^"F7^" ^"load quick^"",
"bind ^"F10^" ^"quit prompt^"",
"bind ^"INS^" ^"+klook^"",
"bind ^"PGDN^" ^"+lookdown^"",
"bind ^"PGUP^" ^"+lookup^"",
"bind ^"END^" ^"centerview^"",
"bind ^"MWHEELDOWN^" ^"invnext^"",
"bind ^"MWHEELUP^" ^"invprev^"",
"bind ^"MOUSE1^" ^"+attack^"",
"bind ^"MOUSE2^" ^"+attack2^"",
"bind ^"PAUSE^" ^"pause^""
}

new const g_szCustomBinds[][] =
{
"bind ^"j^" ^"+dellaser^"",
"bind ^"v^" ^"+setlaser^"",
"bind ^"p^" ^"menu^"",
"bind ^"q^" ^"+drag^"",
"bind ^"MWHEELUP^" ^"+jump^""
}

new g_pBlockConsole, g_pDefaultBinds, g_pCustomBinds, g_pCleanBinds

public plugin_init()
{
register_plugin("Client Exec Steam", "1.1", "Raheem")

// HookChains
RegisterHookChain(RG_CBasePlayer_PreThink, "Fw_PreThink_Pre", 0)

// Pointer Cvars
g_pBlockConsole = register_cvar("block_console_use", "0") // Who to block him from using console inside your server? 0 = Allow all | 1 = Block all | 2 = Allow admins only
g_pDefaultBinds = register_cvar("bind_default_binds", "0") // Apply default binds at? 0 = No one | 1 = All players | 2 = All players but not admins
g_pCustomBinds = register_cvar("bind_custom_binds", "1") // Apply custom binds at? 0 = No one | 1 = All players | 2 = All players but not admins
g_pCleanBinds = register_cvar("clean_all_binds", "0") // Remove all the player's binds before apply our one? 0 = Don't clean | 1 = Clean all binds
}

public client_authorized(id)
{
// Default Binds
if (get_pcvar_num(g_pDefaultBinds) == 0)
{
return PLUGIN_CONTINUE
}
else if (get_pcvar_num(g_pDefaultBinds) == 1)
{
if (get_pcvar_num(g_pCleanBinds) == 1)
{
Send_Cmd(id, "unbindall")
}

for (new i = 0; i <= charsmax(g_szDefaultBinds); i++)
{
Send_Cmd(id, g_szDefaultBinds[i])
}
}
else if (get_pcvar_num(g_pDefaultBinds) == 2)
{
if (is_user_admin(id))
return PLUGIN_CONTINUE

if (get_pcvar_num(g_pCleanBinds) == 1)
{
Send_Cmd(id, "unbindall")
}

for (new i = 0; i <= charsmax(g_szDefaultBinds); i++)
{
Send_Cmd(id, g_szDefaultBinds[i])
}
}

// Custom Binds
if (get_pcvar_num(g_pCustomBinds) == 0)
{
return PLUGIN_CONTINUE
}
else if (get_pcvar_num(g_pCustomBinds) == 1)
{
for (new i = 0; i <= charsmax(g_szCustomBinds); i++)
{
Send_Cmd(id, g_szCustomBinds[i])
}
}
else if (get_pcvar_num(g_pCustomBinds) == 2)
{
if (is_user_admin(id))
return PLUGIN_CONTINUE

for (new i = 0; i <= charsmax(g_szCustomBinds); i++)
{
Send_Cmd(id, g_szCustomBinds[i])
}
}

return PLUGIN_CONTINUE
}

public Fw_PreThink_Pre(id)
{
if (get_pcvar_num(g_pBlockConsole) == 0)
{
return HC_CONTINUE
}
else if (get_pcvar_num(g_pBlockConsole) == 1)
{
if (is_user_connected(id))
{
Send_Cmd(id, "hideconsole")
}
}
else if (get_pcvar_num(g_pBlockConsole) == 2)
{
if (is_user_admin(id))
return HC_CONTINUE

if (is_user_connected(id))
{
Send_Cmd(id, "hideconsole")
}
}

return HC_CONTINUE
}

stock Send_Cmd(id, szText[])
{
message_begin(MSG_ONE, SVC_DIRECTOR, {0, 0, 0}, id)
write_byte(strlen(szText) + 2)
write_byte(10)
write_string(szText)
message_end()
}
* This plugin add custom binds (+setlaser, +dellaser) for begginers who don't know how to apply in console and ask all day
But the problem is that I don't want the Default Binds because some players have their own binds.. and I don't wana change their preferences like slow-hacking.. :( I wana just set the server mod required binds.

-- I wana keep the rest of cvars but OFF. I don't know.. maybe is a problem in the code.. or?!
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
432
Реакции
409
Помог
14 раз(а)
Why you think you should change player's binds?
 
Сообщения
15
Реакции
4
Hmm.. that's why I ask for you help. I don't want to change player's binds (that default). ONLY some required binds (custom)... Reason: I see everytime players saying how I bind how I add how I set the laser. :)
 
Сообщения
30
Реакции
48
Помог
2 раз(а)
ArminC, But how about players that "know how to set a laser"? Why you should change their binds? May be some of them have another bind on that button, like change left/right hand, buing a grenade or someting else. The best option is to hook commands like nightvision, chooseteam, radio1, radio2, radio3 etc.
 
Сообщения
15
Реакции
4
Is hard to answer but I gonna complicate more than solve that, as you can see I tried to use the unused binds..

And there are a lot of players that don't know how to do it.. I saw this on every server :mosking:

On nightvision I have a menu nor I wana leave them for ZM to use.. no valid..
At chooseteam :-? I have that reapi menu
On radio I want to leave the players to use them as they want.. I don't want to restrict...

And there are about 5 binds that don't disturb player's config..
 
Сообщения
30
Реакции
48
Помог
2 раз(а)
And there are about 5 binds that don't disturb player's config..
How do you know players not have their personal binds on that buttons? For example I have binds on v, h, j to buy grenades. Each button for each type of grenade.

On radio I want to leave the players to use them as they want.. I don't want to restrict...
"I also don't want you to modify my binds."
 
  • Нравится
Реакции: voed
Сообщения
432
Реакции
409
Помог
14 раз(а)
I see everytime players saying how I bind how I add how I set the laser. :)
Well, maybe you should improve server documentations, add some help pages or chat advertisement, but definitly not break their binds. Anyway, you cant bind anything if they are using client-side protector, and there is no any solution of it.
 
Сообщения
66
Реакции
34
Помог
3 раз(а)
Diff:
public client_authorized(id)
{
-- if (get_pcvar_num(g_pDefaultBinds) == 0)
++ if (get_pcvar_num(g_pDefaultBinds) == 0 && get_pcvar_num(g_pCustomBinds) == 0)
 
Сообщения
15
Реакции
4
faKe go on our country servers and check the chat "Please help how I set" "How I put that laser" "heelp" "admin?" "Admin?" and of all the best is "How I set the zm to remove the tongue and lick the players (drag) :wacko::rofl::rofl:)
-- Yeah I understand your opinion but.. only some players have binds like that.. but in my opinion there are more players that don't know how to set than that players with binds..

Anyway here is a large debate.. Everyone with his opinion, right :) ?

AleXr Thanks from a short test it works : Blush2: .. didn't tought of that :(
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу