merhaba arkadaslar redbull pluginine ufak bi düzenleme istiyorum son 1 kisi kalınca redbull basılmasın .
Konu
dener misin
PHP Kod:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
new bool:has_rb[33]
new cost_cvar, lasts_cvar, speed_cvar
public plugin_init()
{
new map[ 32 ];
get_mapname( map, 31 );
if( ( containi ( map, "jail" ) == -1 ) && ( containi( map, "jb_" ) == -1 ) ) return
register_clcmd("say /redbull","say_cmd_handle")
cost_cvar = register_cvar("RB_Cost","-2")
lasts_cvar = register_cvar("RB_Lasts","12.0")
speed_cvar = register_cvar("RB_Speed","750.0")
register_event("CurWeapon","curweap","be")
}
public curweap(id)
{
if(is_user_alive(id) && has_rb[id])
{
client_cmd(id,"cl_forwardspeed 9999999;cl_backspeed 9999999;cl_sidespeed 9999999")
set_user_maxspeed(id,get_pcvar_float(speed_cvar))
}
}
public client_connect(id) has_rb[id]=false
public client_disconnect(id) has_rb[id]=false
public say_cmd_handle(id)
{
new mahkum,players[32]; get_players(players,mahkum,"acehi","TERRORIST");
if(mahkum <= 1){
renkli_yazi(id,"!n[!t FeNKa ~> !n] !gTekken Redbull basilmaz.")
return PLUGIN_HANDLED;
}
}
if(!is_user_alive(id))
{
renkli_yazi(id,"!n[!t FeNKa ~> !n] !gOluyken redbull alamazsin.")
}
else if(has_rb[id])
{
renkli_yazi(id,"!n[!t FeNKa ~> !n] !gZaten Redbull etkin devam ediyor.")
}
else if(cs_get_user_money(id)<get_pcvar_num(cost_cvar))
{
renkli_yazi(id,"!n[!t FeNKa ~> !n] !gRedbull icin yeterli paran yok. Gereken para $%d. ",get_pcvar_num(cost_cvar))
}
else
{
cs_set_user_money(id,cs_get_user_money(id) - get_pcvar_num(cost_cvar),1)
has_rb[id]=true
set_task(get_pcvar_float(lasts_cvar),"redbull_over",id)
set_task(1.0,"plus_hp",id,"",0,"b")
set_user_gravity(id,0.5)
set_user_maxspeed(id,get_pcvar_float(speed_cvar))
renkli_yazi(id,"!n[!t FeNKa ~> !n] !gRedbull satin aldin.")
renkli_yazi(id,"!n[!t FeNKa ~> !n] !gRedbull etkisinin gecmesine 20 saniye var.")
}
}
public plus_hp(id)
{
if(has_rb[id]) set_user_health(id,get_user_health(id)+1)
}
public redbull_over(id)
{
if(is_user_connected(id))
{
has_rb[id]=false
renkli_yazi(id,"!n[!t FeNKa ~> !n] !gRedbull Etkisi gecti.")
set_user_gravity(id,1.0)
set_user_maxspeed(id,320.0)
set_user_gravity(id,1.0)
remove_task(id)
}
}
stock renkli_yazi(const id, const input[], any:...)
{
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!n", "^x01"); // Default Renk(Sarı)
replace_all(msg, 190, "!g", "^x04"); // Yeşil Renk
replace_all(msg, 190, "!t", "^x03"); // Takım Renk( CT mavi , T kırmızı )
if (id) players[0] = id; else get_players(players, count, "ch");
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
Son Düzenleme: 29-06-2020, 00:10, Düzenleyen: scuro.
hata var reis
Error: Number of arguments does not match definition on line 41
Warning: Function "say_cmd_handle" should return a value on line 45
Error: Invalid function or declaration on line 46
Error: Number of arguments does not match definition on line 41
Warning: Function "say_cmd_handle" should return a value on line 45
Error: Invalid function or declaration on line 46
bulamadım ki hepsinde sona kalınca redbull basılıyor.
birtane buldum fakat bundada hata var.
Error: Cannot read from file: "reapi" on line 2
birtane buldum fakat bundada hata var.
Error: Cannot read from file: "reapi" on line 2
Son Düzenleme: 29-06-2020, 00:54, Düzenleyen: lasthasaki66.
buyur https://webailesi.com/konu-gelismis-redbull-eklentisi-46
bu da kendi kullandıgım
bu da kendi kullandıgım
PHP Kod:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define bmTag "!n[ !tWEBAilesi.COM !n]"
new bmKullanim[33],bmKalanSure[33];
new bmSure,bmJail,bmElBasi,bmHizC,Float:bmKorumaSure;
public plugin_init() {
register_plugin
("Gelismis Redbull",
"1.4",
"Berk");
register_clcmd("say /redbull","beRedbull");
register_clcmd("bmRedbull","beRedbull");
bmSure = register_cvar("bm_sure","15");
bmJail = register_cvar("bm_sonadam","1");
bmElBasi = register_cvar("bm_elbasi","1");
bmHizC = register_cvar("bm_hiz","800");
register_event("HLTV", "beRS", "a", "1=0", "2=0");
RegisterHam(Ham_Spawn, "player", "bePS", 1);
RegisterHam(Ham_Killed, "player", "beAO") ;
}
public beRS(){
if(get_pcvar_num(bmElBasi) == 1){
bmKorumaSure = get_gametime()+3.0;
}
}
public bePS(bmID){
bmKullanim[bmID] = 0;
bmKalanSure[bmID] = 0;
remove_task(bmID);
}
public beAO(){
if(get_pcvar_num(bmJail) == 1){
new bmOyuncular[32],bmSayi
get_players(bmOyuncular, bmSayi ,"ae", "TERRORIST");
if(bmSayi == 1){
new bmID;
get_players(bmOyuncular, bmSayi ,"a");
for(new i; i < bmSayi; i++){
bmID = bmOyuncular[i];
bmKullanim[bmID] = 0;
bmKalanSure[bmID] = 0;
set_pev(bmID,pev_maxspeed,320.0);
set_pev(bmID,pev_gravity,1.0);
remove_task(bmID);
}
}
}
}
public beRedbull(bmID){
if(get_pcvar_num(bmElBasi) == 1){
if(get_gametime() < bmKorumaSure){
renkli_yazi(bmID,"%s !gBeklerken redbull, !tbiraz beklemelisin!n.",bmTag);
return PLUGIN_HANDLED;
}
}
if(get_pcvar_num(bmJail) == 1){
new bmOyuncular[32],bmSayi
get_players(bmOyuncular, bmSayi ,"ae", "TERRORIST");
if(bmSayi == 1){
renkli_yazi(bmID,"%s !gTekken redbull!n, !tmahkum takimda tek bir kisi var!n.",bmTag);
return PLUGIN_HANDLED;
}
}
if(!is_user_alive(bmID)){
renkli_yazi(bmID,"%s !gOluyken redbull!, !tbence cilginsin!n.",bmTag);
}
else if(bmKullanim[bmID] == 1){
renkli_yazi(bmID,"%s !gZaten redbull!n, !tkullaniyorsunuz!n.",bmTag);
}
else{
bmKullanim[bmID] = 1;
renkli_yazi(bmID,"%s !gRedbull icildi!n, !tkanatlaniyorsunuz!n.",bmTag);
bmKalanSure[bmID] = get_pcvar_num(bmSure);
beRedbullIc(bmID);
}
return PLUGIN_CONTINUE;
}
public beRedbullIc(bmID){
if(bmKalanSure[bmID] > 0){
bmKalanSure[bmID]--;
set_pev(bmID,pev_health,pev(bmID,pev_health)+1.0);
set_pev(bmID,pev_maxspeed,get_pcvar_float(bmHizC));
set_pev(bmID,pev_gravity,0.5);
set_task(1.0,"beRedbullIc",bmID);
}
else{
bmKullanim[bmID] = 0;
renkli_yazi(bmID,"%s !gRedbull bitti!n, !tkanatlar gidiyor!n.",bmTag);
set_pev(bmID,pev_maxspeed,320.0);
set_pev(bmID,pev_gravity,1.0);
}
}
#if AMXX_VERSION_NUM < 183
stock renkli_yazi(const id, const input[], any:...){
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!n", "^x01"); // Default Renk(Sarı)
replace_all(msg, 190, "!g", "^x04"); // YeÅŸil Renk
replace_all(msg, 190, "!t", "^x03"); // Takım Renk( CT mavi , T kırmızı )
if (id) players[0] = id; else get_players(players, count, "ch");{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
#else
stock renkli_yazi(const id, const input[], any:...){
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!n", "^x01");
replace_all(msg, 190, "!g", "^x04");
replace_all(msg, 190, "!t", "^x03");
client_print_color(id, id, msg);
}
#endif
Son Düzenleme: 29-06-2020, 00:55, Düzenleyen: scuro.
şunu yükledin dimi bunu yükle bu sorunsuz
PHP Kod:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define bmTag "!n[ !tWEBAilesi.COM !n]"
new bmKullanim[33],bmKalanSure[33];
new bmSure,bmJail,bmElBasi,bmHizC,Float:bmKorumaSure;
public plugin_init() {
register_plugin
("Gelismis Redbull",
"1.4",
"Berk");
register_clcmd("say /redbull","beRedbull");
register_clcmd("bmRedbull","beRedbull");
bmSure = register_cvar("bm_sure","15");
bmJail = register_cvar("bm_sonadam","1");
bmElBasi = register_cvar("bm_elbasi","1");
bmHizC = register_cvar("bm_hiz","800");
register_event("HLTV", "beRS", "a", "1=0", "2=0");
RegisterHam(Ham_Spawn, "player", "bePS", 1);
RegisterHam(Ham_Killed, "player", "beAO") ;
}
public beRS(){
if(get_pcvar_num(bmElBasi) == 1){
bmKorumaSure = get_gametime()+3.0;
}
}
public bePS(bmID){
bmKullanim[bmID] = 0;
bmKalanSure[bmID] = 0;
remove_task(bmID);
}
public beAO(){
if(get_pcvar_num(bmJail) == 1){
new bmOyuncular[32],bmSayi
get_players(bmOyuncular, bmSayi ,"ae", "TERRORIST");
if(bmSayi == 1){
new bmID;
get_players(bmOyuncular, bmSayi ,"a");
for(new i; i < bmSayi; i++){
bmID = bmOyuncular[i];
bmKullanim[bmID] = 0;
bmKalanSure[bmID] = 0;
set_pev(bmID,pev_maxspeed,320.0);
set_pev(bmID,pev_gravity,1.0);
remove_task(bmID);
}
}
}
}
public beRedbull(bmID){
if(get_pcvar_num(bmElBasi) == 1){
if(get_gametime() < bmKorumaSure){
renkli_yazi(bmID,"%s !gBeklerken redbull, !tbiraz beklemelisin!n.",bmTag);
return PLUGIN_HANDLED;
}
}
if(get_pcvar_num(bmJail) == 1){
new bmOyuncular[32],bmSayi
get_players(bmOyuncular, bmSayi ,"ae", "TERRORIST");
if(bmSayi == 1){
renkli_yazi(bmID,"%s !gTekken redbull!n, !tmahkum takimda tek bir kisi var!n.",bmTag);
return PLUGIN_HANDLED;
}
}
if(!is_user_alive(bmID)){
renkli_yazi(bmID,"%s !gOluyken redbull!, !tbence cilginsin!n.",bmTag);
}
else if(bmKullanim[bmID] == 1){
renkli_yazi(bmID,"%s !gZaten redbull!n, !tkullaniyorsunuz!n.",bmTag);
}
else{
bmKullanim[bmID] = 1;
renkli_yazi(bmID,"%s !gRedbull icildi!n, !tkanatlaniyorsunuz!n.",bmTag);
bmKalanSure[bmID] = get_pcvar_num(bmSure);
beRedbullIc(bmID);
}
return PLUGIN_CONTINUE;
}
public beRedbullIc(bmID){
if(bmKalanSure[bmID] > 0){
bmKalanSure[bmID]--;
set_pev(bmID,pev_health,pev(bmID,pev_health)+1.0);
set_pev(bmID,pev_maxspeed,get_pcvar_float(bmHizC));
set_pev(bmID,pev_gravity,0.5);
set_task(1.0,"beRedbullIc",bmID);
}
else{
bmKullanim[bmID] = 0;
renkli_yazi(bmID,"%s !gRedbull bitti!n, !tkanatlar gidiyor!n.",bmTag);
set_pev(bmID,pev_maxspeed,320.0);
set_pev(bmID,pev_gravity,1.0);
}
}
#if AMXX_VERSION_NUM < 183
stock renkli_yazi(const id, const input[], any:...){
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!n", "^x01"); // Default Renk(Sarı)
replace_all(msg, 190, "!g", "^x04"); // YeÅŸil Renk
replace_all(msg, 190, "!t", "^x03"); // Takım Renk( CT mavi , T kırmızı )
if (id) players[0] = id; else get_players(players, count, "ch");{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
#else
stock renkli_yazi(const id, const input[], any:...){
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!n", "^x01");
replace_all(msg, 190, "!g", "^x04");
replace_all(msg, 190, "!t", "^x03");
client_print_color(id, id, msg);
}
#endif
Benzer Konular
Yorum
547
Okunma
28-03-2026, 23:15
)


