Проблема со скоростью и гравитацией

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
61
Реакции
3
Ошибка
Сбрасывается скорость при смене оружия (q)
Сбрасывается гравитация при использовании парашюта
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5232 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Oct 14 2018 08:47:55
Built from: https://github.com/alliedmodders/amxmodx/commit/be52641
Build ID: 5232:be52641
Core mode: JIT+ASM32
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.4.0.668-dev
Build date: 09:47:42 Sep 29 2018 (1631)
ReGamedll
ReGameDLL version: 5.7.0.318-dev
Build date: 21:07:26 Oct 30 2018
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Список метамодулей
[ 1] SafeNameAndChat  RUN   -    safenameandchat.so          v1.0            ini   ANY
[ 2] VoiceTranscoder RUN - vtc.so v2017RC3 ini ANY
[ 3] AMX Mod X RUN - amxmodx.so v1.9.0.5232 ini ANY
[ 4] Reunion RUN - reunion.so v0.1.0.133 ini Start Never
[ 5] ReAuthCheck RUN - reauthcheck.so v0.1.6 ini Start Never
[ 6] Rechecker RUN - rechecker.so v2.5 ini ANY
[ 7] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini ANY
[ 8] WHBlocker RUN - whblocker.so v1.5.695 ini ANY
[ 9] MySQL RUN - mysql_amxx_i386.so v1.9.0.5232 pl3 ANY
[10] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5232 pl3 ANY
[11] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl3 ANY Never
[12] ReAPI RUN - reapi_amxx_i386.so v5.6.0.160-dev pl3 ANY Never
[13] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5232 pl3 ANY
[14] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5219 pl3 ANY
[15] Engine RUN - engine_amxx_i386.so v1.9.0.5232 pl3 ANY
[16] Fun RUN - fun_amxx_i386.so v1.9.0.5232 pl3 ANY
[17] CSX RUN - csx_amxx_i386.so v1.9.0.5219 pl3 ANY
17 plugins, 17 running
Список плагинов
[  1] Admin Loader            1.5.4       neygomon          admin_loader_fo  running
[ 2] FreshBans 1.3.6 kanagava fresh_bans.amxx running
[ 3] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 4] FocusOnVotemap 1.2.1 Boec[SpecOPs] focus_on_votema running
[ 5] No Players Map 1.03 neygomon no_players_map. running
[ 6] Ping Checker 26.0.1 RC1 h1k3 ping_checker.am running
[ 7] CSDM Core 0.0.8 Vaqtincha csdm_core.amxx running
[ 8] CSStatsX SQL 0.7.4+1 serfreeman1337 csstatsx_sql.am running
[ 9] ReCSDM Team Balance 1.0.3 the_hunter recsdm_team_bal running
[ 10] Chat Manager 1.1.1-11 Mistrick chatmanager.amx running
[ 11] top player 1.0 vk.com/CSPlugin aatop_player.am running
[ 12] Chat Manager: Addon 0.0.4-70 Mistrick chatmanager_add running
[ 13] Ad From Server 1.0 BadMandarin ad_from_server. running
[ 14] AFK Control 1.4.1 [NoR neygomon afk_control.amx running
[ 15] Admin Chat 1.9.0.5232 AMXX Dev Team adminchat.amxx running
[ 16] Admin Commands 1.9.0.5232 AMXX Dev Team admincmd.amxx running
[ 17] Commands Menu 1.9.0.5232 AMXX Dev Team cmdmenu.amxx running
[ 18] Menus Front-End 1.9.0.5232 AMXX Dev Team menufront.amxx running
[ 19] Maps Menu 1.9.0.5232 AMXX Dev Team mapsmenu.amxx running
[ 20] Players Menu 1.9.0.5232 AMXX Dev Team plmenu.amxx running
[ 21] Plugin Menu 1.9.0.5232 AMXX Dev Team pluginmenu.amxx running
[ 22] Restrict Weapons 1.8.2 AMXX Dev Team restmenu.amxx running
[ 23] GoldMenu v2 amax goldmenu.amxx running
[ 24] Admin Votes 1.9.0.5232 AMXX Dev Team adminvote.amxx running
[ 25] CS Misc. Stats 1.8.2 AMXX Dev Team miscstats.amxx running
[ 26] CS Stats Logging 1.8.2 AMXX Dev Team stats_logging.a running
[ 27] Teleport Menu 1.9.0.5232 AMXX Dev Team telemenu.amxx running
[ 28] Stats Configuration 1.9.0.5232 AMXX Dev Team statscfg.amxx running
[ 29] [ReAPI] Block 'Fire in 0.0.1 sergrib block_fire_in_t running
[ 30] Menu 1.01 amax menu_server.amx running
[ 31] unknown unknown unknown gamename_change running
[ 32] Unlimited Ammo 0.0.3 Vaqtincha Unlimited_Ammo. running
[ 33] [CSDM] Multijump 0.1 di.alyabev 2jump.amxx running
[ 34] Golden Ak 47 1.0 AlejandroSk golden_ak_47.am debug
[ 35] Admin Money 0.9.3 f117bomb admin_money.amx running
[ 36] golden m4a1 1.0 Alicx DarK golden_m4a1.amx debug
[ 37] Golden Deagle 1.0 GANNIBALISHE golden_deagle.a debug
[ 38] Gold AWP 1.0 nick gold_awp.amxx debug
[ 39] Parachute for ALL [ReA 3.0 Leo_[BH] parachute_for_a running
[ 40] Give Money 1.0 Cs-StrikeS.Moy.S give_money.amxx running
[ 41] RE Vampire 1.0.7 MakapoH, AcE, RE re_vampire.amxx running
[ 42] [All mod] Grab 2.1 Ian Cammarata / grab.amxx running
[ 43] Ghost Mode 1.4 Kiosk3 ghost_mode.amxx running
[ 44] Advanced Bullet Damage 1.0 Vaqtincha damager.amxx running
[ 45] Shop for Knife 0.1beta -NegaTiV- shop.amxx running
[ 46] Advanced Gag 1.9.0 neygomon amx_gag.amxx running
[ 47] Christmas hat 0.3 AMXX.Shop christmas_hat_r running
[ 48] Auto Demo Recorder 2.3 F@nt0M auto_demo_recor running
[ 49] Auto Join on Connect 0.1 VEN auto_join_on_co running
[ 50] [ReAPI] AWPoff 1.3 PAffAEJIkA :3 awp_off.amxx running
[ 51] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 52] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 53] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 54] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 55] CSDM Equip Manager 0.0.8 Vaqtincha csdm_equip_mana running
[ 56] CSDM Spawn Manager 0.0.8 Vaqtincha csdm_spawn_mana running
[ 57] CSDM Misc 0.0.8 Vaqtincha csdm_misc.amxx running
[ 58] CSDM Protection 0.0.8 Vaqtincha csdm_protection running
[ 59] CSDM Map Cleaner 0.0.8 Vaqtincha csdm_map_cleane running
[ 60] Map Manager: Core 3.0.0 Mistrick map_manager_cor running
[ 61] Map Manager: Scheduler 0.1.0 Mistrick map_manager_sch running
[ 62] Map Manager: Rtv 0.0.4 Mistrick map_manager_rtv running
[ 63] Map Manager: Nominatio 0.0.8 Mistrick map_manager_nom running
[ 64] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 65] Map Manager: Online so 0.0.2 Mistrick map_manager_onl running
[ 66] Map Manager: Effects 0.0.8 Mistrick map_manager_eff running
[ 67] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
67 plugins, 67 running
Автор плагина
-NegaTiV-
Версия плагина
0.1beta
Исходный код
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>
#include <engine>
#if !defined client_print_color
#include <colorchat>
#endif

#define FL_WATERJUMP (1<<11)
#define FL_ONGROUND (1<<9)

#define PLUGIN "Shop for Knife"
#define VERSION "0.1beta"
#define AUTHOR "-NegaTiV-"


new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_0
new Gravity[33], Speed[33], Health[33], HeGrenade[33], FreezGrenade[33], Rendering[33], Bhop[33], Bunny_Hop[33]

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)

register_menu("Menu 1", keys, "func_menu")
register_clcmd("say /shop", "ShopKnife")
register_concmd("shop", "ShopKnife")
RegisterHam(Ham_Spawn, "player", "player_spawn", 1)
}

public player_spawn(id)
{
Gravity[id] = 0
Speed[id] = 0
Health[id] = 0
HeGrenade[id] = 0
FreezGrenade[id] = 0
Rendering[id] = 0
Bhop[id] = 0
Bunny_Hop[id] = false
}

public client_connect(id)
{
Bunny_Hop[id] = false
}

public ShopKnife(id)
{
static menu[1024], len
len = 0

new my_money = cs_get_user_money(id)

// Menu
if(get_user_flags(id) & ADMIN_LEVEL_A) {
len += formatex(menu[len], charsmax(menu) - len, "\r[ \yМагазин\r ] \wСкидка: \yЕсть^n^n")
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r[ \yМагазин\r ] \wСкидка: \dНету^n^n")
}


if(get_user_flags(id) & ADMIN_LEVEL_A)
{
if(!is_user_alive(id) || my_money < 5000 || Gravity[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r[1] » \dГравитация (\r5000$\d)^n")
keys &= ~MENU_KEY_1
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r[1] » \wГравитация \d(\r5000$\d)^n")
keys |= MENU_KEY_1
}
} else {
if(!is_user_alive(id) || my_money < 10000 || Gravity[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r[1] » \dГравитация (\r10000$\d)^n")
keys &= ~MENU_KEY_1
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r[1] » \wГравитация \d(\r10000$\d)^n")
keys |= MENU_KEY_1
}
}

if(get_user_flags(id) & ADMIN_LEVEL_A)
{
if(!is_user_alive(id) || my_money < 5000 || Speed[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r[2] » \dСкорость (\r5000$\d)^n")
keys &= ~MENU_KEY_2
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r[2] » \wСкорость \d(\r5000$\d)^n")
keys |= MENU_KEY_2
}
} else {
if(!is_user_alive(id) || my_money < 10000 || Speed[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r[2] » \dСкорость (\r10000$\d)^n")
keys &= ~MENU_KEY_2
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r[2] » \wСкорость \d(\r10000$\d)^n")
keys |= MENU_KEY_2
}
}

if(get_user_flags(id) & ADMIN_LEVEL_A)
{
if(!is_user_alive(id) || my_money < 5000 || Health[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r[3] » \dВзять +255 HP (\r5000$\d)^n")
keys &= ~MENU_KEY_3
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r[3] » \wВзять +255 HP \d(\r5000$\d)^n")
keys |= MENU_KEY_3
}
} else {
if(!is_user_alive(id) || my_money < 8000 || Health[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r[3] » \d+255 HP (\r8000$\d)^n")
keys &= ~MENU_KEY_3
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r[3] » \w+255 HP \d(\r8000$\d)^n")
keys |= MENU_KEY_3
}
}

if(get_user_flags(id) & ADMIN_LEVEL_A)
{
if(!is_user_alive(id) || my_money < 4500 || HeGrenade[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r[4] » \dВзрывная граната (\r4500$\d)^n")
keys &= ~MENU_KEY_4
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r[4] » \wВзрывная граната \d(\r4500$\d)^n")
keys |= MENU_KEY_4
}
} else {
if(!is_user_alive(id) || my_money < 9000 || HeGrenade[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r[4] » \dВзрывная граната (\r9000$\d)^n")
keys &= ~MENU_KEY_4
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r[4] » \wВзрывная граната \d(\r9000$\d)^n")
keys |= MENU_KEY_4
}
}

if(get_user_flags(id) & ADMIN_LEVEL_A)
{
if(!is_user_alive(id) || my_money < 4500 || FreezGrenade[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r[5] » \dЗамораживающая гараната (\r4500$\d)^n")
keys &= ~MENU_KEY_5
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r[5] » \wЗамораживающая гараната \d(\r4500$\d)^n")
keys |= MENU_KEY_5
}
} else {
if(!is_user_alive(id) || my_money < 16000 || FreezGrenade[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r[5] » \dЗамораживающая гараната (\r9000$\d)^n")
keys &= ~MENU_KEY_5
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r[5] » \wЗамораживающая гараната \d(\r9000$\d)^n")
keys |= MENU_KEY_5
}
}

if(get_user_flags(id) & ADMIN_LEVEL_A)
{
if(!is_user_alive(id) || my_money < 12000 || Rendering[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r[6] » \dНевидимость (\r12000$\d)^n")
keys &= ~MENU_KEY_6
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r[6] » \wНевидимость \d(\r12000$\d)^n")
keys |= MENU_KEY_6
}
} else {
if(!is_user_alive(id) || my_money < 16000 || Rendering[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r[6] » \dНевидимость (\r16000$\d)^n")
keys &= ~MENU_KEY_6
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r[6] » \wНевидимость \d(\r16000$\d)^n")
keys |= MENU_KEY_6
}
}

if(get_user_flags(id) & ADMIN_LEVEL_A)
{
if(!is_user_alive(id) || my_money < 8000 || Bhop[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r[7] » \dБанихоп (\r8000$\d)^n^n")
keys &= ~MENU_KEY_7
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r[7] » \wБанихоп \d(\r8000$\d)^n^n")
keys |= MENU_KEY_7
}
} else {
if(!is_user_alive(id) || my_money < 16000 || Health[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r[7] » \dБанихоп (\r16000$\d)^n^n")
keys &= ~MENU_KEY_7
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r[7] » \wБанихоп \d(\r16000$\d)^n^n")
keys |= MENU_KEY_7
}
}

len += formatex(menu[len], charsmax(menu) - len, "\r[0] x \wВыход")
keys |= MENU_KEY_0

show_menu(id, keys, menu, -1, "Menu 1")
return PLUGIN_HANDLED;
}

public func_menu(id, key)
{
new my_money = cs_get_user_money(id)

switch(key)
{
case 0:{
if(get_user_flags(id) & ADMIN_LEVEL_A) {
if(!is_user_alive(id) || my_money < 5000 || Gravity[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 5000)
set_user_gravity(id, 0.5)
client_print_color(id, print_team_default, "^1[^4Shop^1] ^3Вы купили: ^4Гравитацию")
Gravity[id]++
}
} else {
if(!is_user_alive(id) || my_money < 10000 || Gravity[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 10000)
set_user_gravity(id, 0.5)
client_print_color(id, print_team_default, "^1[^4Shop^1] ^3Вы купили: ^4Гравитацию")
Gravity[id]++
}
}
}
case 1:{
if(get_user_flags(id) & ADMIN_LEVEL_A) {
if(!is_user_alive(id) || my_money < 5000 || Speed[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 5000)
set_user_maxspeed(id, 320.0)
client_print_color(id, print_team_default, "^1[^4Shop^1] ^3Вы купили: ^4Скорость")
Speed[id]++
}
} else {
if(!is_user_alive(id) || my_money < 10000 || Gravity[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 10000)
set_user_maxspeed(id, 320.0)
client_print_color(id, print_team_default, "^1[^4Shop^1] ^3Вы купили: ^4Скорость")
Speed[id]++
}
}
}
case 2:{
if(get_user_flags(id) & ADMIN_LEVEL_A) {
if(!is_user_alive(id) || my_money < 5000 || Health[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 5000)
set_user_health(id, get_user_health(id) + 255)
client_print_color(id, print_team_default, "^1[^4Shop^1] ^3Вы купили: ^4+255 HP")
Health[id]++
}
} else {
if(!is_user_alive(id) || my_money < 8000 || Health[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 8000)
set_user_health(id, get_user_health(id) + 255)
client_print_color(id, print_team_default, "^1[^4Shop^1] ^3Вы купили: ^4+255 HP")
Health[id]++
}
}
}
case 3:{
if(get_user_flags(id) & ADMIN_LEVEL_A) {
if(!is_user_alive(id) || my_money < 4500 || HeGrenade[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 4500)
give_item(id, "weapon_hegrenade")
client_print_color(id, print_team_default, "^1[^4Shop^1] ^3Вы купили: ^4Взрывную гранату")
HeGrenade[id]++
}
} else {
if(!is_user_alive(id) || my_money < 9000 || HeGrenade[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 9000)
give_item(id, "weapon_hegrenade")
client_print_color(id, print_team_default, "^1[^4Shop^1] ^3Вы купили: ^4Взрывную гранату")
HeGrenade[id]++
}
}
}
case 4:{
if(get_user_flags(id) & ADMIN_LEVEL_A) {
if(!is_user_alive(id) || my_money < 4500 || FreezGrenade[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 4500)
give_item(id, "weapon_smokegrenade")
client_print_color(id, print_team_default, "^1[^4Shop^1] ^3Вы купили: ^4Замораживающую гранату")
FreezGrenade[id]++
}
} else {
if(!is_user_alive(id) || my_money < 9000 || FreezGrenade[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 9000)
give_item(id, "weapon_smokegrenade")
client_print_color(id, print_team_default, "^1[^4Shop^1] ^3Вы купили: ^4Замораживающую гранату")
FreezGrenade[id]++
}
}
}
case 5:{
if(get_user_flags(id) & ADMIN_LEVEL_A) {
if(!is_user_alive(id) || my_money < 12000 || Rendering[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 12000)
set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,20)
client_print_color(id, print_team_default, "^1[^4Shop^1] ^3Вы купили: ^4Невидимость")
Rendering[id]++
}
} else {
if(!is_user_alive(id) || my_money < 16000 || Rendering[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 16000)
set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,20)
client_print_color(id, print_team_default, "^1[^4Shop^1] ^3Вы купили: ^4Невидимость")
Rendering[id]++
}
}
}
case 6:{
if(get_user_flags(id) & ADMIN_LEVEL_A) {
if(!is_user_alive(id) || my_money < 8000 || Bhop[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 8000)
Bunny_Hop[id] = true
client_print_color(id, print_team_default, "^1[^4Shop^1] ^3Вы купили: ^4Банихоп")
Bhop[id]++
}
} else {
if(!is_user_alive(id) || my_money < 16000 || Bhop[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 16000)
Bunny_Hop[id] = true
client_print_color(id, print_team_default, "^1[^4Shop^1] ^3Вы купили: ^4Банихоп")
Bhop[id]++
}
}
}
}
return PLUGIN_HANDLED;
}

public client_PreThink(id)
{
entity_set_float(id, EV_FL_fuser2, 0.0)
if(entity_get_int(id, EV_INT_button) & 2)
{
new flags = entity_get_int(id, EV_INT_flags)
if(flags & FL_WATERJUMP)
return PLUGIN_CONTINUE
if(entity_get_int(id, EV_INT_waterlevel) >= 2)
return PLUGIN_CONTINUE
if(!(flags & FL_ONGROUND))
return PLUGIN_CONTINUE

new Float:vecVelocity[3]
entity_get_vector(id, EV_VEC_velocity, vecVelocity)

if(Bunny_Hop[id])
vecVelocity[2] += 250.0

entity_set_vector(id, EV_VEC_velocity, vecVelocity)
entity_set_int(id, EV_INT_gaitsequence, 6)
}
return PLUGIN_CONTINUE
}
Пропадает скорость ри смене оружия и гравитация при использовании парашюта.
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
2,491
Реакции
2,794
Помог
61 раз(а)
1. Хукать нужно reset max speed
2. Формирование меню можна легко сократить в несколько раз смело, выбрав нужные цены заранее.
3. есть реализация банихопа получше на реапи
4. получения флагов лучше сделать раз
5. Куча магических чисел

Все решения не единажды поднимались на форуме. А мой вам совет. Выбросьте тот плагин и найдите нормальный. Ну или на крайний случай закажите доработку до ума
 
Последнее редактирование:
Сообщения
3,593
Реакции
1,576
Помог
141 раз(а)
Попробуй это для фикса скорости:

Код:
#include <amxmodx>
#include <hamsandwich>

#define SPEED 400

public plugin_init()
{
    RegisterHam(Ham_Item_PreFrame, "player", "v_PlayerFixMaxSpeed", 0)
}
public v_PlayerFixMaxSpeed(id)
{
    if (!is_user_connected(id))
    return HAM_IGNORED;
    
    if (get_user_maxspeed(id) != SPEED)
    return HAM_IGNORED;
    return HAM_SUPERCEDE;
}
Где SPEED - необходимая скорость
 
Сообщения
2,491
Реакции
2,794
Помог
61 раз(а)
sbelov020, вы читали первый пункт? Скорость сбрасивается в хуке RG_CBasePlayer_ResetMaxSpeed или Ham_CS_Player_ResetMaxSpeed
 
Сообщения
3,593
Реакции
1,576
Помог
141 раз(а)
Парашют без сброса гравити:


Код:
#include <amxmodx>
#include <engine>
#include <hamsandwich>
 
public plugin_init()
{
   register_plugin("Parachute", "1.0", "maeStro");
   RegisterHam(Ham_ObjectCaps, "player", "FwdHamObjectCaps");   
}
 
public FwdHamObjectCaps(id)
{
    if (!is_user_alive(id)||get_entity_flags(id) & FL_ONGROUND) return;
    static Float:velocity[3];
    entity_get_vector(id, EV_VEC_velocity, velocity);
    if(velocity[2] < 0)
    {
        velocity[2] = (velocity[2] + 40.0 < -100) ? velocity[2] + 40.0 : -100.0;
        entity_set_vector(id, EV_VEC_velocity, velocity);
    }
}
25 Ноя 2018
fantom, да, но в его исходнике ничего подобного не заметил
 
Статус
В этой теме нельзя размещать новые ответы.

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

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