⭐🚀 TkyNET | Blacklist ve Profesyonel DDoS Korumalı TeamSpeak 3 Sunucuları 🚀⭐
Sponsor Görsel
SponsorSponsor

Redbull Kapatma

Redbull kapatma
Redbull pluginini cvar ile kapatmak istiyorum 
Kod:
#pragma semicolon 1

#include <amxmodx>
#include <reapi>

new const serverTag[] = "EvaneS";

enum _: Bools {
redbull,
togglered,
redbuy
};
enum _: CvarSet {
RSpeed,
RCost,
RHealth,
Float:RGravity
};

new iCvars[CvarSet],bool:iL_Bool[MAX_CLIENTS+1][Bools];

public plugin_init(){
register_plugin("Ac Kapat Redbull","1.1","suriyelikene");
register_clcmd("radio1", "@RedbullUse");
register_clcmd("say /redbull","@RedbullUse");
register_clcmd("say .redbull","@RedbullUse");
register_clcmd("say_team /redbull","@RedbullUse");

RegisterHookChain(RG_CBasePlayer_Killed, "@PlayerKilled", .post = true);
RegisterHookChain(RG_CBasePlayer_Spawn, "@IsSpawn", .post = true);
RegisterHookChain(RG_CBasePlayer_ResetMaxSpeed,"@ResetMaxSpeed", .post = false);

bind_pcvar_num(create_cvar("redbull_fiyat","107"), iCvars[RCost]);
bind_pcvar_num(create_cvar("redbull_maxhiz","700"), iCvars[RSpeed]);
bind_pcvar_num(create_cvar("redbull_maxhp","150"), iCvars[RHealth]);
bind_pcvar_float(create_cvar("redbull_gravity","0.5"), iCvars[RGravity]);
}
@RedbullUse(const iPlayer){
if(!is_user_alive(iPlayer)){
client_print_color(iPlayer,iPlayer,"^4[^3%s^4] ^1Mantiken Yasamadigin Icin ^4Redbulla Erisim Kapalidir.",serverTag);
return PLUGIN_HANDLED;
}

static iNumT;
rg_initialize_player_counts(iNumT);
if(iNumT <= 1) {
client_print_color(iPlayer,iPlayer,"^4[^3%s^4] ^1Son Mahkum Oldugun Icin ^4Redbulla Erisim Kapalidir.",serverTag);
return PLUGIN_HANDLED;
}
if(!iL_Bool[iPlayer][redbuy]){
if(get_member(iPlayer, m_iAccount) >= iCvars[RCost]) {
set_entvar(iPlayer, var_gravity, iCvars[RGravity]);
set_entvar(iPlayer, var_maxspeed, float(iCvars[RSpeed]));
set_task(1.0,"@AddHealth",iPlayer+1707);
iL_Bool[iPlayer][redbull] = true;
iL_Bool[iPlayer][togglered] = true;
iL_Bool[iPlayer][redbuy] = true;
client_print_color(iPlayer,iPlayer, "^4[^3%s^4] ^1%d $^3 Karsiliginda ^4RedBull ^1Satin Aldiniz.",serverTag,iCvars[RCost]);
client_print_color(iPlayer,iPlayer, "^4[^3%s^4] ^1RedBull'u ^4'Z' ^3Tusuna Basarak ^4Acip, Kapatabilirsin.",serverTag);
}
}
else
{
if(!iL_Bool[iPlayer][togglered])
{
set_entvar(iPlayer, var_gravity, iCvars[RGravity]);
set_entvar(iPlayer, var_maxspeed, float(iCvars[RSpeed]));
set_task(1.0,"@AddHealth",iPlayer+1707);
iL_Bool[iPlayer][redbull] = true;
iL_Bool[iPlayer][togglered] = true;
client_print_color(iPlayer,iPlayer,"^4[^3%s^4] ^1RedBull ^4Aktif Edildi!",serverTag);
}
else
{
remove_task(iPlayer+1707);
set_entvar(iPlayer, var_maxspeed, 300.0);
set_entvar(iPlayer, var_gravity, 1.0);
iL_Bool[iPlayer][redbull] = false;
iL_Bool[iPlayer][togglered] = false;
client_print_color(iPlayer,iPlayer,"^4[^3%s^4] ^1RedBull ^4Devre Disi Birakildi!",serverTag);
}
}
return PLUGIN_HANDLED;
}
@AddHealth(const iTaskim){
new iPlayer = iTaskim - 1707;
if(!is_user_alive(iPlayer) || !iL_Bool[iPlayer][redbull]) return;

if(get_entvar(iPlayer, var_health) < float(iCvars[RHealth])) {
set_entvar(iPlayer, var_health, Float:get_entvar(iPlayer, var_health) + 1.0);
}
set_entvar(iPlayer, var_maxspeed, float(iCvars[RSpeed]));
set_entvar(iPlayer, var_gravity, iCvars[RGravity]);
set_task(1.0,"@AddHealth",iPlayer+1707);
}
@PlayerKilled(const iVictim, const iAttacker) {
static iNumT;
rg_initialize_player_counts(iNumT);
if(iNumT <= 1){
for(new i = 1; i <= MaxClients; i++) {
if(is_user_alive(i)){
set_entvar(i, var_maxspeed, 300.0);
set_entvar(i, var_gravity, 1.0);
iL_Bool[i][redbull] = false;
remove_task(i+1707);
}
}
}
}
@ResetMaxSpeed(const iPlayer){
if(iL_Bool[iPlayer][redbull]){
set_entvar(iPlayer, var_maxspeed, float(iCvars[RSpeed]));
set_entvar(iPlayer, var_gravity, iCvars[RGravity]);
return HC_SUPERCEDE;
}
return HC_CONTINUE;
}
@IsSpawn(const iPlayer) {
if(!is_user_alive(iPlayer)) return;

if(task_exists(iPlayer+1707)) remove_task(iPlayer+1707);
iL_Bool[iPlayer][redbull]=false;
iL_Bool[iPlayer][togglered]=false;
}
public client_connect(iPlayer){
iL_Bool[iPlayer][redbull]=false;
iL_Bool[iPlayer][togglered]=false;
iL_Bool[iPlayer][redbuy]=false;
}
public client_disconnected(iPlayer){
iL_Bool[iPlayer][redbull]=false;
iL_Bool[iPlayer][togglered]=false;
iL_Bool[iPlayer][redbuy]=false;
if(task_exists(iPlayer+1707)) remove_task(iPlayer+1707);
}

688733639
RE: Redbull kapatma
PHP Kod:
#pragma semicolon 1

#include <amxmodx>
#include <reapi>

new const serverTag[] = "EvaneS";

enum _: Bools {
redbull,
togglered,
redbuy
};
enum _: CvarSet {
RSpeed,
RCost,
RHealth,
Float:RGravity,
ROn
};

new 
iCvars[CvarSet],bool:iL_Bool[MAX_CLIENTS+1][Bools];

public 
plugin_init(){
register_plugin("Ac Kapat Redbull","1.1","suriyelikene");
register_clcmd("radio1", "@RedbullUse");
register_clcmd("say /redbull","@RedbullUse");
register_clcmd("say .redbull","@RedbullUse");
register_clcmd("say_team /redbull","@RedbullUse");

RegisterHookChain(RG_CBasePlayer_Killed, "@PlayerKilled", .post = true);
RegisterHookChain(RG_CBasePlayer_Spawn, "@IsSpawn", .post = true);
RegisterHookChain(RG_CBasePlayer_ResetMaxSpeed,"@ResetMaxSpeed", .post = false);

bind_pcvar_num(create_cvar("redbull_fiyat","107"), iCvars[RCost]);
bind_pcvar_num(create_cvar("redbull_maxhiz","700"), iCvars[RSpeed]);
bind_pcvar_num(create_cvar("redbull_maxhp","150"), iCvars[RHealth]);
bind_pcvar_float(create_cvar("redbull_gravity","0.5"), iCvars[RGravity]);
bind_pcvar_num(create_cvar("redbull_on","1"), iCvars[ROn]);
}

@
RedbullUse(const iPlayer){

if(!
iCvars[ROn]) {
client_print_color(iPlayer,iPlayer,"^4[^3%s^4] ^4Redbulla Erisim Kapalidir.",serverTag);
return 
PLUGIN_HANDLED;
}

if(!
is_user_alive(iPlayer)){
client_print_color(iPlayer,iPlayer,"^4[^3%s^4] ^1Mantiken Yasamadigin Icin ^4Redbulla Erisim Kapalidir.",serverTag);
return 
PLUGIN_HANDLED;
}

static 
iNumT;
rg_initialize_player_counts(iNumT);
if(
iNumT <= 1) {
client_print_color(iPlayer,iPlayer,"^4[^3%s^4] ^1Son Mahkum Oldugun Icin ^4Redbulla Erisim Kapalidir.",serverTag);
return 
PLUGIN_HANDLED;
}
if(!
iL_Bool[iPlayer][redbuy]){
if(
get_member(iPlayer, m_iAccount) >= iCvars[RCost]) {
set_entvar(iPlayer, var_gravity, iCvars[RGravity]);
set_entvar(iPlayer, var_maxspeed, float(iCvars[RSpeed]));
set_task(1.0,"@AddHealth",iPlayer+1707);
iL_Bool[iPlayer][redbull] = true;
iL_Bool[iPlayer][togglered] = true;
iL_Bool[iPlayer][redbuy] = true;
client_print_color(iPlayer,iPlayer, "^4[^3%s^4] ^1%d $^3 Karsiliginda ^4RedBull ^1Satin Aldiniz.",serverTag,iCvars[RCost]);
client_print_color(iPlayer,iPlayer, "^4[^3%s^4] ^1RedBull'u ^4'Z' ^3Tusuna Basarak ^4Acip, Kapatabilirsin.",serverTag);
}
}
else
{
if(!
iL_Bool[iPlayer][togglered])
{
set_entvar(iPlayer, var_gravity, iCvars[RGravity]);
set_entvar(iPlayer, var_maxspeed, float(iCvars[RSpeed]));
set_task(1.0,"@AddHealth",iPlayer+1707);
iL_Bool[iPlayer][redbull] = true;
iL_Bool[iPlayer][togglered] = true;
client_print_color(iPlayer,iPlayer,"^4[^3%s^4] ^1RedBull ^4Aktif Edildi!",serverTag);
}
else
{
remove_task(iPlayer+1707);
set_entvar(iPlayer, var_maxspeed, 300.0);
set_entvar(iPlayer, var_gravity, 1.0);
iL_Bool[iPlayer][redbull] = false;
iL_Bool[iPlayer][togglered] = false;
client_print_color(iPlayer,iPlayer,"^4[^3%s^4] ^1RedBull ^4Devre Disi Birakildi!",serverTag);
}
}
return 
PLUGIN_HANDLED;
}
@
AddHealth(const iTaskim){
new 
iPlayer = iTaskim - 1707;
if(!
is_user_alive(iPlayer) || !iL_Bool[iPlayer][redbull]) return;

if(
get_entvar(iPlayer, var_health) < float(iCvars[RHealth])) {
set_entvar(iPlayer, var_health, Float:get_entvar(iPlayer, var_health) + 1.0);
}
set_entvar(iPlayer, var_maxspeed, float(iCvars[RSpeed]));
set_entvar(iPlayer, var_gravity, iCvars[RGravity]);
set_task(1.0,"@AddHealth",iPlayer+1707);
}
@
PlayerKilled(const iVictim, const iAttacker) {
static 
iNumT;
rg_initialize_player_counts(iNumT);
if(
iNumT <= 1){
for(new 
i = 1; i <= MaxClients; i++) {
if(
is_user_alive(i)){
set_entvar(i, var_maxspeed, 300.0);
set_entvar(i, var_gravity, 1.0);
iL_Bool[i][redbull] = false;
remove_task(i+1707);
}
}
}
}
@
ResetMaxSpeed(const iPlayer){
if(
iL_Bool[iPlayer][redbull]){
set_entvar(iPlayer, var_maxspeed, float(iCvars[RSpeed]));
set_entvar(iPlayer, var_gravity, iCvars[RGravity]);
return 
HC_SUPERCEDE;
}
return 
HC_CONTINUE;
}
@
IsSpawn(const iPlayer) {
if(!
is_user_alive(iPlayer)) return;

if(
task_exists(iPlayer+1707)) remove_task(iPlayer+1707);
iL_Bool[iPlayer][redbull]=false;
iL_Bool[iPlayer][togglered]=false;
}
public 
client_connect(iPlayer){
iL_Bool[iPlayer][redbull]=false;
iL_Bool[iPlayer][togglered]=false;
iL_Bool[iPlayer][redbuy]=false;
}
public 
client_disconnected(iPlayer){
iL_Bool[iPlayer][redbull]=false;
iL_Bool[iPlayer][togglered]=false;
iL_Bool[iPlayer][redbuy]=false;
if(
task_exists(iPlayer+1707)) remove_task(iPlayer+1707);
} 
Kod:
bind_pcvar_num(create_cvar("redbull_on","1"), iCvars[ROn]);
Birinde redbull aktifken sen cvardan kapatırsan sorun oluşabilir.Seni rahatsız ederse bunu düzeltebiliriz.
Steam:Tıkla • Discord: lynchk
RE: Redbull kapatma
İstek konusu, @"orucoglukayra" adlı kullanıcı tarafından 2 gün içinde çözülmüştür.
İsteği çözdüğü için orucoglukayra Adlı kullanıcıya 1 rep puanı ve 1 yardım etme puanı otomatik olarak verilmiştir.
orucoglukayra Adlı kullanıcı sizin dışınızda toplam 523 kişiye yardım etmiştir.

Herhangi bir konuda hata olduğunu düşünüyorsanız destek sistemi üzerinden iletişim kurabilirsiniz.

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da
Konuyu Okuyanlar: 1 Ziyaretçi
Task