Eklenti sorunlarınız ve özel eklenti istekleriniz
Moderatör: Moderatörler
Colditz
Mesajlar: 2574 Kayıt: Çrş Ağu 23, 2017 9:17 pm
Mesaj
gönderen Colditz » Sal Ara 22, 2020 2:45 am
Buyur dener misin?
Kod: Tümünü seç
#include <amxmodx>
#include <reapi>
new g_iJumpCount[MAX_CLIENTS + 1];
public plugin_init() {
register_plugin("[ReAPI] - PreJump Blocker", "0.1", "Leeyé");
RegisterHookChain(RG_CBasePlayer_Jump, "@CBasePlayer_Jump_Post", .post = true);
}
@CBasePlayer_Jump_Post(const pPlayer) {
if(~get_entvar(pPlayer, var_flags) & FL_ONGROUND || get_entvar(pPlayer, var_oldbuttons) & IN_JUMP) {
return;
}
if(g_iJumpCount[pPlayer] >= 2) {
new Float:flVelocity[3];
get_entvar(pPlayer, var_velocity, flVelocity);
for(new i = 0; i < 3; i++) {
flVelocity[i] = (flVelocity[i] / 2.0);
}
set_entvar(pPlayer, var_velocity, flVelocity);
}
else {
g_iJumpCount[pPlayer]++;
if(!task_exists(pPlayer)) {
set_task(2.0, "@DeleteTask", pPlayer);
}
}
}
@DeleteTask(const pPlayer) {
g_iJumpCount[pPlayer] = 0;
}
Konu Sahibi
Victores
Mesajlar: 188 Kayıt: Çrş May 27, 2020 8:58 pm
Mesaj
gönderen Victores » Sal Ara 22, 2020 2:57 am
Colditz yazdı: Sal Ara 22, 2020 2:45 am
Buyur dener misin?
Kod: Tümünü seç
#include <amxmodx>
#include <reapi>
new g_iJumpCount[MAX_CLIENTS + 1];
public plugin_init() {
register_plugin("[ReAPI] - PreJump Blocker", "0.1", "Leeyé");
RegisterHookChain(RG_CBasePlayer_Jump, "@CBasePlayer_Jump_Post", .post = true);
}
@CBasePlayer_Jump_Post(const pPlayer) {
if(~get_entvar(pPlayer, var_flags) & FL_ONGROUND || get_entvar(pPlayer, var_oldbuttons) & IN_JUMP) {
return;
}
if(g_iJumpCount[pPlayer] >= 2) {
new Float:flVelocity[3];
get_entvar(pPlayer, var_velocity, flVelocity);
for(new i = 0; i < 3; i++) {
flVelocity[i] = (flVelocity[i] / 2.0);
}
set_entvar(pPlayer, var_velocity, flVelocity);
}
else {
g_iJumpCount[pPlayer]++;
if(!task_exists(pPlayer)) {
set_task(2.0, "@DeleteTask", pPlayer);
}
}
}
@DeleteTask(const pPlayer) {
g_iJumpCount[pPlayer] = 0;
}
bende hafif ping varda şuanda ya hiç yavaşlatmadı ya da yavaşlatması işe yaramadı. yani bunny yapıyorum böyle anlık eğilme oluyor ama yavaşlatmıyor eğilme oluyor.
Colditz
Mesajlar: 2574 Kayıt: Çrş Ağu 23, 2017 9:17 pm
Mesaj
gönderen Colditz » Sal Ara 22, 2020 3:15 am
2.0 ı kendinize göre ayarlayın. İstediğiniz şekilde olana kadar denemeniz lazım.
omertas14544
Mesajlar: 1604 Kayıt: Prş Oca 26, 2017 3:23 pm
Mesaj
gönderen omertas14544 » Sal Ara 22, 2020 10:34 am
Victores yazdı: Sal Ara 22, 2020 2:57 am
Colditz yazdı: Sal Ara 22, 2020 2:45 am
Buyur dener misin?
Kod: Tümünü seç
#include <amxmodx>
#include <reapi>
new g_iJumpCount[MAX_CLIENTS + 1];
public plugin_init() {
register_plugin("[ReAPI] - PreJump Blocker", "0.1", "Leeyé");
RegisterHookChain(RG_CBasePlayer_Jump, "@CBasePlayer_Jump_Post", .post = true);
}
@CBasePlayer_Jump_Post(const pPlayer) {
if(~get_entvar(pPlayer, var_flags) & FL_ONGROUND || get_entvar(pPlayer, var_oldbuttons) & IN_JUMP) {
return;
}
if(g_iJumpCount[pPlayer] >= 2) {
new Float:flVelocity[3];
get_entvar(pPlayer, var_velocity, flVelocity);
for(new i = 0; i < 3; i++) {
flVelocity[i] = (flVelocity[i] / 2.0);
}
set_entvar(pPlayer, var_velocity, flVelocity);
}
else {
g_iJumpCount[pPlayer]++;
if(!task_exists(pPlayer)) {
set_task(2.0, "@DeleteTask", pPlayer);
}
}
}
@DeleteTask(const pPlayer) {
g_iJumpCount[pPlayer] = 0;
}
bende hafif ping varda şuanda ya hiç yavaşlatmadı ya da yavaşlatması işe yaramadı. yani bunny yapıyorum böyle anlık eğilme oluyor ama yavaşlatmıyor eğilme oluyor.
Kod: Tümünü seç
#include <amxmodx>
#include <reapi>
new Float:JumpDelay[MAX_CLIENTS+1];
new Float:TotalJump[MAX_CLIENTS+1];
public plugin_init()
{
register_plugin("[ReAPI] - PreJump Blocker","0.1","Leeyé");
RegisterHookChain(RG_CBasePlayer_Jump,"PlayerJumped",0);
}
public PlayerJumped(const id)
{
if(~get_entvar(id,var_flags) & FL_ONGROUND) {
return
}
if(JumpDelay[id] >= get_gametime()+2.4)
{
new Float:velocity[3];
get_entvar(id,var_velocity,velocity);
velocity[0] = (velocity[0]/3.0)
velocity[1] = (velocity[1]/3.0)
velocity[2] = (velocity[1]/3.0)
set_entvar(id,var_velocity,velocity);
TotalJump[id] = 0.0;
}
else
{
TotalJump[id]+=0.8
remove_task(id);
set_task(0.8,"TotalJumpD",id);
JumpDelay[id] = get_gametime()+TotalJump[id];
}
}
public TotalJumpD(const id)
{
if(is_user_connected(id))
{
TotalJump[id]-=0.8
}
}
public client_disconnected(id)
{
TotalJump[id] = 0.0
}
Test ettim. İstediğiniz gibi çalışıyor. Sizde test edebilir misiniz?
Konu Sahibi
Victores
Mesajlar: 188 Kayıt: Çrş May 27, 2020 8:58 pm
Mesaj
gönderen Victores » Sal Ara 22, 2020 1:59 pm
omertas14544 yazdı: Sal Ara 22, 2020 10:34 am
Victores yazdı: Sal Ara 22, 2020 2:57 am
Colditz yazdı: Sal Ara 22, 2020 2:45 am
Buyur dener misin?
Kod: Tümünü seç
#include <amxmodx>
#include <reapi>
new g_iJumpCount[MAX_CLIENTS + 1];
public plugin_init() {
register_plugin("[ReAPI] - PreJump Blocker", "0.1", "Leeyé");
RegisterHookChain(RG_CBasePlayer_Jump, "@CBasePlayer_Jump_Post", .post = true);
}
@CBasePlayer_Jump_Post(const pPlayer) {
if(~get_entvar(pPlayer, var_flags) & FL_ONGROUND || get_entvar(pPlayer, var_oldbuttons) & IN_JUMP) {
return;
}
if(g_iJumpCount[pPlayer] >= 2) {
new Float:flVelocity[3];
get_entvar(pPlayer, var_velocity, flVelocity);
for(new i = 0; i < 3; i++) {
flVelocity[i] = (flVelocity[i] / 2.0);
}
set_entvar(pPlayer, var_velocity, flVelocity);
}
else {
g_iJumpCount[pPlayer]++;
if(!task_exists(pPlayer)) {
set_task(2.0, "@DeleteTask", pPlayer);
}
}
}
@DeleteTask(const pPlayer) {
g_iJumpCount[pPlayer] = 0;
}
bende hafif ping varda şuanda ya hiç yavaşlatmadı ya da yavaşlatması işe yaramadı. yani bunny yapıyorum böyle anlık eğilme oluyor ama yavaşlatmıyor eğilme oluyor.
Kod: Tümünü seç
#include <amxmodx>
#include <reapi>
new Float:JumpDelay[MAX_CLIENTS+1];
new Float:TotalJump[MAX_CLIENTS+1];
public plugin_init()
{
register_plugin("[ReAPI] - PreJump Blocker","0.1","Leeyé");
RegisterHookChain(RG_CBasePlayer_Jump,"PlayerJumped",0);
}
public PlayerJumped(const id)
{
if(~get_entvar(id,var_flags) & FL_ONGROUND) {
return
}
if(JumpDelay[id] >= get_gametime()+2.4)
{
new Float:velocity[3];
get_entvar(id,var_velocity,velocity);
velocity[0] = (velocity[0]/3.0)
velocity[1] = (velocity[1]/3.0)
velocity[2] = (velocity[1]/3.0)
set_entvar(id,var_velocity,velocity);
TotalJump[id] = 0.0;
}
else
{
TotalJump[id]+=0.8
remove_task(id);
set_task(0.8,"TotalJumpD",id);
JumpDelay[id] = get_gametime()+TotalJump[id];
}
}
public TotalJumpD(const id)
{
if(is_user_connected(id))
{
TotalJump[id]-=0.8
}
}
public client_disconnected(id)
{
TotalJump[id] = 0.0
}
Test ettim. İstediğiniz gibi çalışıyor. Sizde test edebilir misiniz?
bende denedim elinize sağlık hocam iş görür gibi şey soracağım sadece
hani 3 defa yapınca 3.de engelliyor ya bir daha bunny yapabilmek için ne kadar süre geçmesi lazım? o süreyi 0.5sn yapabilir miyiz? hani 2 defa yaptın bir daha yapmak için yani bizi durdurmaması için 0.5 sn geçmesi gereksin
bestcore
Mesajlar: 1625 Kayıt: Cmt Eyl 30, 2017 12:44 pm
Konum: Samsun
Mesaj
gönderen bestcore » Sal Ara 22, 2020 2:38 pm
Colditz yazdı: Sal Ara 22, 2020 2:45 am
Buyur dener misin?
Kod: Tümünü seç
#include <amxmodx>
#include <reapi>
new g_iJumpCount[MAX_CLIENTS + 1];
public plugin_init() {
register_plugin("[ReAPI] - PreJump Blocker", "0.1", "Leeyé");
RegisterHookChain(RG_CBasePlayer_Jump, "@CBasePlayer_Jump_Post", .post = true);
}
@CBasePlayer_Jump_Post(const pPlayer) {
if(~get_entvar(pPlayer, var_flags) & FL_ONGROUND || get_entvar(pPlayer, var_oldbuttons) & IN_JUMP) {
return;
}
if(g_iJumpCount[pPlayer] >= 2) {
new Float:flVelocity[3];
get_entvar(pPlayer, var_velocity, flVelocity);
for(new i = 0; i < 3; i++) {
flVelocity[i] = (flVelocity[i] / 2.0);
}
set_entvar(pPlayer, var_velocity, flVelocity);
}
else {
g_iJumpCount[pPlayer]++;
if(!task_exists(pPlayer)) {
set_task(2.0, "@DeleteTask", pPlayer);
}
}
}
@DeleteTask(const pPlayer) {
g_iJumpCount[pPlayer] = 0;
}
Bu registerhookchain kodlarına kütüphanelerin içinden mi ulaşacağız? Yoksa başka bir yer var mı?
bestcore
Mesajlar: 1625 Kayıt: Cmt Eyl 30, 2017 12:44 pm
Konum: Samsun
Mesaj
gönderen bestcore » Sal Ara 22, 2020 3:03 pm
Colditz yazdı: Sal Ara 22, 2020 2:43 pm
Çok işime yarayacak teşekkürler, birde şuanlık tek anlamadığım şey bu registerlerin, eventlerin sonuna gelen, 1,post True, false, 1=1 bunları ne durumlarda, neye göre koyuyoruz? Teşekkürler.
Colditz
Mesajlar: 2574 Kayıt: Çrş Ağu 23, 2017 9:17 pm
Mesaj
gönderen Colditz » Sal Ara 22, 2020 4:09 pm
bestcore yazdı: Sal Ara 22, 2020 3:03 pm
Çok işime yarayacak teşekkürler, birde şuanlık tek anlamadığım şey bu registerlerin, eventlerin sonuna gelen, 1,post True, false, 1=1 bunları ne durumlarda, neye göre koyuyoruz? Teşekkürler.
https://dev-cs.ru/threads/12022/#post-89917
omertas14544
Mesajlar: 1604 Kayıt: Prş Oca 26, 2017 3:23 pm
Mesaj
gönderen omertas14544 » Sal Ara 22, 2020 4:42 pm
Kod: Tümünü seç
#include <amxmodx>
#include <reapi>
new Float:JumpDelay[MAX_CLIENTS+1];
new Float:TotalJump[MAX_CLIENTS+1];
public plugin_init()
{
register_plugin("[ReAPI] - PreJump Blocker","0.1","Leeyé");
RegisterHookChain(RG_CBasePlayer_Jump,"PlayerJumped",0);
}
public PlayerJumped(const id)
{
if(~get_entvar(id,var_flags) & FL_ONGROUND) {
return
}
if(JumpDelay[id] >= get_gametime()+2.4)
{
new Float:velocity[3];
get_entvar(id,var_velocity,velocity);
velocity[0] = (velocity[0]/3.0)
velocity[1] = (velocity[1]/3.0)
velocity[2] = (velocity[1]/3.0)
set_entvar(id,var_velocity,velocity);
TotalJump[id] = 0.0;
JumpDelay[id]+=1.0
}
else
{
TotalJump[id]+=0.8
remove_task(id);
set_task(0.8,"TotalJumpD",id);
JumpDelay[id] = get_gametime()+TotalJump[id];
}
}
public TotalJumpD(const id)
{
if(is_user_connected(id))
{
TotalJump[id]-=0.8
}
}
public client_disconnected(id)
{
TotalJump[id] = 0.0
}
1 saniye boyunca bunny yapamaz. Dener misin ?