Maalesef tepki yok çalışmamaktaColditz yazdı: Sal Ara 29, 2020 10:56 pm Dener misin?
Kod: Tümünü seç
#include <amxmodx> #include <engine> #include <reapi> new Float:g_wallorigin[32][3],p_climb_speed; public plugin_init() { register_plugin("[ZP] Extra Item: Wall climb ", "1.0", "Python1320 & Accelerator"); register_touch("func_wall", "player", "fw_touch"); RegisterHookChain(RG_PM_Move, "PM_Move", .post = false); bind_pcvar_num(create_cvar("amx_climb_speed", "240.0"), p_climb_speed); } public fw_touch(id, world) { if(is_user_alive(id)) { get_entvar(id, var_origin, g_wallorigin[id]) } } public PM_Move(const id) { static button; button = get_entvar(id, var_button); if(button & IN_USE) { static Float:origin[3] get_entvar(id, var_origin, origin); if(get_distance_f(origin, g_wallorigin[id]) > 25.0 || get_pmove(pm_flags) & FL_ONGROUND) { return; } if(button & IN_FORWARD) { static Float:velocity[3] velocity_by_aim(id, p_climb_speed, velocity) set_entvar(id, var_velocity, velocity); } else if(button & IN_BACK) { static Float:velocity[3] velocity_by_aim(id, -p_climb_speed, velocity) set_entvar(id, var_velocity, velocity); } } }
[İSTEK] Reapi Duvara tırmanma
Moderatör: Moderatörler
-
- Mesajlar: 298
- Kayıt: Çrş Ara 26, 2018 3:46 pm
[İSTEK] Reapi Duvara tırmanma
Link: | |
Linklerini gizle |
-
- Mesajlar: 2574
- Kayıt: Çrş Ağu 23, 2017 9:17 pm
-
- Mesajlar: 298
- Kayıt: Çrş Ara 26, 2018 3:46 pm
-
- Mesajlar: 2574
- Kayıt: Çrş Ağu 23, 2017 9:17 pm
[İSTEK] Reapi Duvara tırmanma
Buyur;
Kod: Tümünü seç
#pragma semicolon 1
#include <amxmodx>
#include <engine>
#include <reapi>
new Float:g_wallorigin[MAX_CLIENTS + 1][3], climb_speed;
public plugin_init() {
register_plugin("Wall Climb", "1.0", "PurposeLess");
register_touch("worldspawn", "player", "@Touch_Wall");
RegisterHookChain(RG_PM_Move, "@PM_Move", .post = false);
bind_pcvar_num(create_cvar("climb_speed", "240"), climb_speed);
}
@Touch_Wall(pTouched, pToucher) {
get_entvar(pToucher, var_origin, g_wallorigin[pToucher]);
}
@PM_Move(const pPlayer) {
if(get_pmove(pm_dead) || get_pmove(pm_onground) == 0) {
return;
}
static button;
button = get_entvar(pPlayer, var_button);
if(button & IN_USE) {
static Float:flOrigin[3];
get_pmove(pm_origin, flOrigin);
if(get_distance_f(flOrigin, g_wallorigin[pPlayer]) > 25.0) {
return;
}
if(button & IN_FORWARD) {
static Float:flVelocity[3];
velocity_by_aim(pPlayer, climb_speed, flVelocity);
set_pmove(pm_velocity, flVelocity);
}
else if(button & IN_BACK) {
static Float:flVelocity[3];
velocity_by_aim(pPlayer, -climb_speed, flVelocity);
set_pmove(pm_velocity, flVelocity);
}
}
}
Link: | |
Linklerini gizle |
-
- Mesajlar: 298
- Kayıt: Çrş Ara 26, 2018 3:46 pm
[İSTEK] Reapi Duvara tırmanma
Harikasın be son olarak bunu bir duvaratirmanma[id] bağlayabilirmisin true olunca yapabılsın false ile yapamasınColditz yazdı: Çrş Ara 30, 2020 4:27 am Buyur;
Kod: Tümünü seç
#pragma semicolon 1 #include <amxmodx> #include <engine> #include <reapi> new Float:g_wallorigin[MAX_CLIENTS + 1][3], climb_speed; public plugin_init() { register_plugin("Wall Climb", "1.0", "PurposeLess"); register_touch("worldspawn", "player", "@Touch_Wall"); RegisterHookChain(RG_PM_Move, "@PM_Move", .post = false); bind_pcvar_num(create_cvar("climb_speed", "240"), climb_speed); } @Touch_Wall(pTouched, pToucher) { get_entvar(pToucher, var_origin, g_wallorigin[pToucher]); } @PM_Move(const pPlayer) { if(get_pmove(pm_dead) || get_pmove(pm_onground) == 0) { return; } static button; button = get_entvar(pPlayer, var_button); if(button & IN_USE) { static Float:flOrigin[3]; get_pmove(pm_origin, flOrigin); if(get_distance_f(flOrigin, g_wallorigin[pPlayer]) > 25.0) { return; } if(button & IN_FORWARD) { static Float:flVelocity[3]; velocity_by_aim(pPlayer, climb_speed, flVelocity); set_pmove(pm_velocity, flVelocity); } else if(button & IN_BACK) { static Float:flVelocity[3]; velocity_by_aim(pPlayer, -climb_speed, flVelocity); set_pmove(pm_velocity, flVelocity); } } }
Link: | |
Linklerini gizle |