[İSTEK] Reapi Duvara tırmanma
Moderatör: Moderatörler
-
Konu Sahibi - Mesajlar: 2
- Kayıt: Pzt Ara 28, 2020 11:30 pm
[İSTEK] Reapi Duvara tırmanma
Merhabalar,
E ile duvara tırmanma yapabilirmiyiz acaba ?
E ile duvara tırmanma yapabilirmiyiz acaba ?
Link: | |
Linklerini gizle |
-
- Mesajlar: 2574
- Kayıt: Çrş Ağu 23, 2017 9:17 pm
-
Konu Sahibi - Mesajlar: 2
- Kayıt: Pzt Ara 28, 2020 11:30 pm
REAPI Duvara tırmanma
Evet orada sanırım tırmanma hızı mevcut eğer uygun görürseniz koyarsanız sevinirim çok zorlamıyacaksa sizi
Link: | |
Linklerini gizle |
-
- Mesajlar: 298
- Kayıt: Çrş Ara 26, 2018 3:46 pm
REAPI Duvara tırmanma
İşinize yarar ise eğer buyrun;Colditz yazdı: Pzt Ara 28, 2020 11:39 pm Bunun gibi mi?
https://forums.alliedmods.net/showthread.php?t=72867
Kod: Tümünü seç
#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <zombieplague>
new bool:g_WallClimb[33]
new Float:g_wallorigin[32][3]
new g_maxplayers, item_climb
public plugin_init()
{
register_plugin("[ZP] Extra Item: Wall climb ", "1.0", "Python1320 & Accelerator")
register_forward(FM_Touch, "fwd_touch")
register_forward(FM_PlayerPreThink, "fwd_playerprethink")
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
g_maxplayers = get_maxplayers()
item_climb = zp_register_extra_item("Wall climb", 17, ZP_TEAM_ZOMBIE)
}
public zp_extra_item_selected(player, itemid)
{
if (itemid == item_climb)
{
g_WallClimb[player] = true
client_print(player, print_chat, "[CSP] Sen Duvara Tirmanma Itemi Aldin..");
}
}
public zp_user_infected_post(id, infector)
g_WallClimb[id] = false
public zp_user_humanized_post(id, survivor)
g_WallClimb[id] = false
public fw_PlayerKilled(victim, attacker, shouldgib)
g_WallClimb[victim] = false
public zp_round_ended(winteam)
{
for (new id=1; id<=g_maxplayers; id++)
g_WallClimb[id] = false
}
public client_connect(id)
g_WallClimb[id] = false
public fwd_touch(id, world)
{
if(!is_user_alive(id) || !g_WallClimb[id])
return FMRES_IGNORED
pev(id, pev_origin, g_wallorigin[id])
return FMRES_IGNORED
}
public wallclimb(id, button)
{
static Float:origin[3]
pev(id, pev_origin, origin)
if(get_distance_f(origin, g_wallorigin[id]) > 25.0)
return FMRES_IGNORED // if not near wall
if(fm_get_entity_flags(id) & FL_ONGROUND)
return FMRES_IGNORED
if(button & IN_FORWARD)
{
static Float:velocity[3]
velocity_by_aim(id, 120, velocity)
fm_set_user_velocity(id, velocity)
}
else if(button & IN_BACK)
{
static Float:velocity[3]
velocity_by_aim(id, -120, velocity)
fm_set_user_velocity(id, velocity)
}
return FMRES_IGNORED
}
public fwd_playerprethink(id)
{
if(!g_WallClimb[id])
return FMRES_IGNORED
new button = fm_get_user_button(id)
if(button & IN_USE) //Use button = climb
wallclimb(id, button)
return FMRES_IGNORED
}
Link: | |
Linklerini gizle |
-
- Mesajlar: 729
- Kayıt: Çrş Ağu 22, 2018 9:20 pm
REAPI Duvara tırmanma
Bu işe yaramaz zp plugini ve menuden alınıyorMrFoTo yazdı: Sal Ara 29, 2020 12:55 amİşinize yarar ise eğer buyrun;Colditz yazdı: Pzt Ara 28, 2020 11:39 pm Bunun gibi mi?
https://forums.alliedmods.net/showthread.php?t=72867
Kod: Tümünü seç
#include <amxmodx> #include <fakemeta> #include <fakemeta_util> #include <hamsandwich> #include <zombieplague> new bool:g_WallClimb[33] new Float:g_wallorigin[32][3] new g_maxplayers, item_climb public plugin_init() { register_plugin("[ZP] Extra Item: Wall climb ", "1.0", "Python1320 & Accelerator") register_forward(FM_Touch, "fwd_touch") register_forward(FM_PlayerPreThink, "fwd_playerprethink") RegisterHam(Ham_Killed, "player", "fw_PlayerKilled") g_maxplayers = get_maxplayers() item_climb = zp_register_extra_item("Wall climb", 17, ZP_TEAM_ZOMBIE) } public zp_extra_item_selected(player, itemid) { if (itemid == item_climb) { g_WallClimb[player] = true client_print(player, print_chat, "[CSP] Sen Duvara Tirmanma Itemi Aldin.."); } } public zp_user_infected_post(id, infector) g_WallClimb[id] = false public zp_user_humanized_post(id, survivor) g_WallClimb[id] = false public fw_PlayerKilled(victim, attacker, shouldgib) g_WallClimb[victim] = false public zp_round_ended(winteam) { for (new id=1; id<=g_maxplayers; id++) g_WallClimb[id] = false } public client_connect(id) g_WallClimb[id] = false public fwd_touch(id, world) { if(!is_user_alive(id) || !g_WallClimb[id]) return FMRES_IGNORED pev(id, pev_origin, g_wallorigin[id]) return FMRES_IGNORED } public wallclimb(id, button) { static Float:origin[3] pev(id, pev_origin, origin) if(get_distance_f(origin, g_wallorigin[id]) > 25.0) return FMRES_IGNORED // if not near wall if(fm_get_entity_flags(id) & FL_ONGROUND) return FMRES_IGNORED if(button & IN_FORWARD) { static Float:velocity[3] velocity_by_aim(id, 120, velocity) fm_set_user_velocity(id, velocity) } else if(button & IN_BACK) { static Float:velocity[3] velocity_by_aim(id, -120, velocity) fm_set_user_velocity(id, velocity) } return FMRES_IGNORED } public fwd_playerprethink(id) { if(!g_WallClimb[id]) return FMRES_IGNORED new button = fm_get_user_button(id) if(button & IN_USE) //Use button = climb wallclimb(id, button) return FMRES_IGNORED }
Link: | |
Linklerini gizle |
-
- Mesajlar: 298
- Kayıt: Çrş Ara 26, 2018 3:46 pm
REAPI Duvara tırmanma
Biliyorum isterse ayrıştırıp say'a bağlıyabilir fikir olsun diye attım sadece.bilalgecer47 yazdı: Sal Ara 29, 2020 4:58 amBu işe yaramaz zp plugini ve menuden alınıyorMrFoTo yazdı: Sal Ara 29, 2020 12:55 amİşinize yarar ise eğer buyrun;Colditz yazdı: Pzt Ara 28, 2020 11:39 pm Bunun gibi mi?
https://forums.alliedmods.net/showthread.php?t=72867
Kod: Tümünü seç
#include <amxmodx> #include <fakemeta> #include <fakemeta_util> #include <hamsandwich> #include <zombieplague> new bool:g_WallClimb[33] new Float:g_wallorigin[32][3] new g_maxplayers, item_climb public plugin_init() { register_plugin("[ZP] Extra Item: Wall climb ", "1.0", "Python1320 & Accelerator") register_forward(FM_Touch, "fwd_touch") register_forward(FM_PlayerPreThink, "fwd_playerprethink") RegisterHam(Ham_Killed, "player", "fw_PlayerKilled") g_maxplayers = get_maxplayers() item_climb = zp_register_extra_item("Wall climb", 17, ZP_TEAM_ZOMBIE) } public zp_extra_item_selected(player, itemid) { if (itemid == item_climb) { g_WallClimb[player] = true client_print(player, print_chat, "[CSP] Sen Duvara Tirmanma Itemi Aldin.."); } } public zp_user_infected_post(id, infector) g_WallClimb[id] = false public zp_user_humanized_post(id, survivor) g_WallClimb[id] = false public fw_PlayerKilled(victim, attacker, shouldgib) g_WallClimb[victim] = false public zp_round_ended(winteam) { for (new id=1; id<=g_maxplayers; id++) g_WallClimb[id] = false } public client_connect(id) g_WallClimb[id] = false public fwd_touch(id, world) { if(!is_user_alive(id) || !g_WallClimb[id]) return FMRES_IGNORED pev(id, pev_origin, g_wallorigin[id]) return FMRES_IGNORED } public wallclimb(id, button) { static Float:origin[3] pev(id, pev_origin, origin) if(get_distance_f(origin, g_wallorigin[id]) > 25.0) return FMRES_IGNORED // if not near wall if(fm_get_entity_flags(id) & FL_ONGROUND) return FMRES_IGNORED if(button & IN_FORWARD) { static Float:velocity[3] velocity_by_aim(id, 120, velocity) fm_set_user_velocity(id, velocity) } else if(button & IN_BACK) { static Float:velocity[3] velocity_by_aim(id, -120, velocity) fm_set_user_velocity(id, velocity) } return FMRES_IGNORED } public fwd_playerprethink(id) { if(!g_WallClimb[id]) return FMRES_IGNORED new button = fm_get_user_button(id) if(button & IN_USE) //Use button = climb wallclimb(id, button) return FMRES_IGNORED }
Link: | |
Linklerini gizle |
-
- Mesajlar: 298
- Kayıt: Çrş Ara 26, 2018 3:46 pm
REAPI Duvara tırmanma
Aslında ben düzenleme sağladım sadece reapi olarak nasıl yaparım onu merak ediyorum ?Colditz yazdı: Pzt Ara 28, 2020 11:39 pm Bunun gibi mi?
https://forums.alliedmods.net/showthread.php?t=72867
Kod: Tümünü seç
#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
new bool:g_WallClimb[33]
new Float:g_wallorigin[32][3],p_climb_speed
public plugin_init()
{
register_plugin("[ZP] Extra Item: Wall climb ", "1.0", "Python1320 & Accelerator")
register_forward(FM_Touch, "fwd_touch")
register_forward(FM_PlayerPreThink, "fwd_playerprethink")
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
p_climb_speed = register_cvar("amx_climb_speed", "240.0")
register_clcmd("say duvar","al")
}
public al(id){
g_WallClimb[id] = true
client_print(id, print_chat, "[CSP] Sen Duvara Tirmanma Itemi Aldin..");
}
public fw_PlayerKilled(victim, attacker, shouldgib)
g_WallClimb[victim] = false
public client_connect(id)
g_WallClimb[id] = false
public fwd_touch(id, world)
{
if(!is_user_alive(id) || !g_WallClimb[id])
return FMRES_IGNORED
pev(id, pev_origin, g_wallorigin[id])
return FMRES_IGNORED
}
public wallclimb(id, button)
{
static Float:origin[3]
pev(id, pev_origin, origin)
if(get_distance_f(origin, g_wallorigin[id]) > 25.0)
return FMRES_IGNORED // if not near wall
if(fm_get_entity_flags(id) & FL_ONGROUND)
return FMRES_IGNORED
if(button & IN_FORWARD)
{
static Float:velocity[3]
velocity_by_aim(id, get_pcvar_num(p_climb_speed), velocity)
fm_set_user_velocity(id, velocity)
}
else if(button & IN_BACK)
{
static Float:velocity[3]
velocity_by_aim(id, -get_pcvar_num(p_climb_speed), velocity)
fm_set_user_velocity(id, velocity)
}
return FMRES_IGNORED
}
public fwd_playerprethink(id)
{
if(!g_WallClimb[id])
return FMRES_IGNORED
new button = fm_get_user_button(id)
if(button & IN_USE) //Use button = climb
wallclimb(id, button)
return FMRES_IGNORED
}
Link: | |
Linklerini gizle |
-
- Mesajlar: 2574
- Kayıt: Çrş Ağu 23, 2017 9:17 pm
[İSTEK] Reapi Duvara tırmanma
pev -> var
RegisterHam(Ham_Killed -> RegisterHookChain(RG_CBasePlayer_Killed (true)
register_cvar -> bind_pcvar_num( create_cvar [reapi değil ama bunun kullanılması öneriliyor]
register_forward Touch -> register_touch ile duvara dokunduğunu algılat (func_wall deneyebilirsin olmazsa *]
fm_get_entity_flags -> get_entvar(id, var_flags)
-
PreThink yerine PM_Move kullanabilirsin.
RegisterHam(Ham_Killed -> RegisterHookChain(RG_CBasePlayer_Killed (true)
register_cvar -> bind_pcvar_num( create_cvar [reapi değil ama bunun kullanılması öneriliyor]
register_forward Touch -> register_touch ile duvara dokunduğunu algılat (func_wall deneyebilirsin olmazsa *]
fm_get_entity_flags -> get_entvar(id, var_flags)
-
PreThink yerine PM_Move kullanabilirsin.
Link: | |
Linklerini gizle |
-
- Mesajlar: 298
- Kayıt: Çrş Ara 26, 2018 3:46 pm
[İSTEK] Reapi Duvara tırmanma
Başardım çalıştı hata vermedi yinede siz bi kontrol edermisin ?Colditz yazdı: Sal Ara 29, 2020 3:53 pm pev -> var
RegisterHam(Ham_Killed -> RegisterHookChain(RG_CBasePlayer_Killed (true)
register_cvar -> bind_pcvar_num( create_cvar [reapi değil ama bunun kullanılması öneriliyor]
register_forward Touch -> register_touch ile duvara dokunduğunu algılat (func_wall deneyebilirsin olmazsa *]
fm_get_entity_flags -> get_entvar(id, var_flags)
-
PreThink yerine PM_Move kullanabilirsin.
Kod: Tümünü seç
#include <amxmodx>
#include <fakemeta>
#include <engine>
#include <reapi>
new bool:g_WallClimb[33]
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);
register_clcmd("say duvar","al")
}
public al(id){
g_WallClimb[id] = true
client_print(id, print_chat, "[CSP] Sen Duvara Tirmanma Itemi Aldin..");
}
public CBasePlayer_Killed(const victim)
g_WallClimb[victim] = false
public client_connect(id)
g_WallClimb[id] = false
public fw_touch(id, world)
{
if(!is_user_alive(id) || !g_WallClimb[id])
return FMRES_IGNORED
pev(id, pev_origin, g_wallorigin[id])
return FMRES_IGNORED
}
public wallclimb(id, button)
{
static Float:origin[3]
pev(id, pev_origin, origin)
if(get_distance_f(origin, g_wallorigin[id]) > 25.0)
return FMRES_IGNORED // if not near wall
if(get_entvar(id,var_flags) & FL_ONGROUND)
return FMRES_IGNORED
if(button & IN_FORWARD)
{
static Float:velocity[3]
velocity_by_aim(id, get_pcvar_num(p_climb_speed), velocity)
set_entvar(id, var_velocity)
}
else if(button & IN_BACK)
{
static Float:velocity[3]
velocity_by_aim(id, -get_pcvar_num(p_climb_speed), velocity)
set_entvar(id, var_velocity)
}
return FMRES_IGNORED
}
public CBasePlayer_PreThink(const id)
{
if(!g_WallClimb[id])
return FMRES_IGNORED
new button = get_entvar(id, var_button)
if(button & IN_USE) //Use button = climb
wallclimb(id, button)
return FMRES_IGNORED
}
public PM_Move(id)
{
if(!g_WallClimb[id])
return FMRES_IGNORED
new button = get_entvar(id, var_button)
if(button & IN_USE) //Use button = climb
wallclimb(id, button)
return FMRES_IGNORED
}
Link: | |
Linklerini gizle |
-
- Mesajlar: 2574
- Kayıt: Çrş Ağu 23, 2017 9:17 pm
[İSTEK] Reapi Duvara tırmanma
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(touched, id) {
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);
}
}
}
Link: | |
Linklerini gizle |