Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

DyeR - zdjęcie

DyeR

Rejestracja: 15.07.2014
Aktualnie: Nieaktywny
Poza forum Ostatnio: 23.09.2019 16:44
-----

Moje tematy

Amxbans sie nie czytuje

20.06.2017 21:54

Witam mam dziwny problem z amxbansem

[AMXBans] SQL error: can't connect: 'Can't connect to MySQL server on 'www.gameforest.pl' (4)'
L 06/20/2017 - 22:46:59: [amxbans_core.amxx] [AMXBANS] Index: 3
L 06/20/2017 - 22:46:59: [amxbans_core.amxx] [AMXBANS] Index: 3 | Name: 
L 06/20/2017 - 22:46:59: [amxbans_core.amxx] [AMXBANS] Index: 5
L 06/20/2017 - 22:46:59: [amxbans_core.amxx] [AMXBANS] Index: 5 | Name: 
L 06/20/2017 - 22:46:59: [amxbans_main.amxx] [AMXBans] AMXBans Gm 1.5.1 is online, date: 20:31 07.03.2011
L 06/20/2017 - 22:46:59: [amxbans_core.amxx] [AMXBANS] Index: 2
L 06/20/2017 - 22:46:59: [amxbans_core.amxx] [AMXBANS] Index: 2 | Name: 
L 06/20/2017 - 22:46:59: [amxbans_core.amxx] [AMXBANS] Index: 4
L 06/20/2017 - 22:46:59: [amxbans_core.amxx] [AMXBANS] Index: 4 | Name: 
[AMXBans] No Reasons found
[AMXBans] No Reasons found in Database. Static reasons were loaded instead.
L 06/20/2017 - 22:46:59: [amxbans_main.amxx] [AMXBans] No Reasons found in Database. Static reasons were loaded instead. 

Dodam iż jest to drugi serwer dodany recznie do amxbansa, zdalne połączenie jest dodane.

Problem polega na tym, że czasem działa amxbans a czasem sie nie wczytuje

Co może być nie tak?

Przerobienie flag vipa na tego z generatora.

19.06.2017 11:07

Chciałbym zeby zamiast sprawdzania "FLAGA" było sprawdzanie czy gracz posiada vipa z kodu generatora:

Pomógłby ktoś to przerobić?

 

KOD Z generatora:

#include <amxmodx>

forward amxbans_admin_connect(id);

new bool:g_Vip[33];

public plugin_init(){
	register_plugin("VIP Ultimate", "12.3.0.2", "benio101 & speedkill");
}
public client_authorized(id){
	if(get_user_flags(id) & 524288 == 524288){
		client_authorized_vip(id);
	}
}
public client_authorized_vip(id){
	g_Vip[id]=true;
}
public client_disconnect(id){
	if(g_Vip[id]){
		client_disconnect_vip(id);
	}
}
public client_disconnect_vip(id){
	g_Vip[id]=false;
}
public amxbans_admin_connect(id){
	client_authorized(id);
}

Witam mam takiego vipa:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <cstrike>


#define FLAGA ADMIN_LEVEL_H                             // flaga

#define PLUGIN "vip_menu"
#define VERSION "1.0"
#define AUTHOR "VuX"

#define SCOREATTRIB_NONE    0
#define SCOREATTRIB_DEAD    (1<<0)
#define SCOREATTRIB_BOMB    (1<<1)
#define SCOREATTRIB_VIP        (1<<2)

new bool:HasC4[33]

new health_add
new health_hs_add
new health_max
new nKiller
new nKiller_hp
new nHp_add
new nHp_max

new runda;
new CsArmorType:armortype;

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	RegisterHam(Ham_Spawn, "player", "daj", 1);
	
	register_event("HLTV", "Runda", "a", "1=0", "2=0");
	
	register_event("TextMsg", "Round_Reset", "a", "2&Game_will_restart_in")
	register_logevent("Round_Reset", 2, "1=Game_Commencing")
	register_clcmd("say /vip", "ShowMotd");
	register_message(get_user_msgid("ScoreAttrib"), "MessageScoreAttrib");
	register_event("DeathMsg", "hook_death", "a", "1>0")
	health_add = register_cvar("amx_vip_hp", "5")
	health_hs_add = register_cvar("amx_vip_hp_hs", "10")
	health_max = register_cvar("amx_vip_max_hp", "105")
	
	
}


public Round_Reset()
{
	runda = 0;
}

public func_menu(id)
{
	
	
	new menu = menu_create("Wybierz zestaw broni","func_menu_show")
	menu_additem(menu,"M4A1+DEAGLE","1",0)
	menu_additem(menu,"AK47+DEAGLE","2",0)
	menu_additem(menu,"AWP+DEAGLE","3",0)
	menu_setprop(menu,MPROP_EXIT,MEXIT_ALL)
	menu_display(id,menu,0)
	return PLUGIN_CONTINUE
	
	
	
	
}
public func_menu_show(id,menu,item)
{
	if(item==MENU_EXIT)
	{
		menu_destroy(menu)
		return PLUGIN_HANDLED
	}
	new data[6], iName[64]
	new access, callback
	menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)
	new key = str_to_num(data)
	switch(key)
	{
		case 1 :
		{
			if (user_has_weapon(id, CSW_C4) && get_user_team(id) == 1)
				HasC4[id] = true;
			else
				HasC4[id] = false;
				
				
			
			
				
			strip_user_weapons(id)
			give_item(id, "weapon_knife");
			give_item(id, "weapon_m4a1")
			give_item(id,"ammo_556nato")
			give_item(id,"ammo_556nato")
			give_item(id,"ammo_556nato")
			give_item(id,"ammo_556nato")
			give_item(id,"weapon_deagle")
			give_item(id,"ammo_50ae")
			give_item(id,"ammo_50ae")
			give_item(id,"ammo_50ae")
			give_item(id,"ammo_50ae")
			give_item(id,"ammo_50ae")
			give_item(id,"ammo_50ae")
			give_item(id,"ammo_50ae")
			give_item(id,"weapon_hegrenade")
			give_item(id,"weapon_flashbang")
			give_item(id,"weapon_flashbang")
			give_item(id,"weapon_smokegrenade")
			
			if (HasC4[id])
			{
				give_item(id, "weapon_c4");
				cs_set_user_plant( id );
			}
			
			if (get_user_team(id) == 2)
			{
				give_item(id, "item_thighpack");
			}
			
		}
		case 2:
		{
			if (user_has_weapon(id, CSW_C4) && get_user_team(id) == 1)
				HasC4[id] = true;
			else
				HasC4[id] = false;
				
			strip_user_weapons(id)
			give_item(id, "weapon_knife");
			give_item(id, "weapon_ak47")  
			give_item(id,"ammo_762nato")
			give_item(id,"ammo_762nato")
			give_item(id,"ammo_762nato")
			give_item(id,"ammo_762nato")
			give_item(id,"weapon_deagle")
			give_item(id,"ammo_50ae")
			give_item(id,"ammo_50ae")
			give_item(id,"ammo_50ae")
			give_item(id,"ammo_50ae")
			give_item(id,"ammo_50ae")
			give_item(id,"ammo_50ae")
			give_item(id,"ammo_50ae")
			give_item(id,"weapon_hegrenade")
			give_item(id,"weapon_flashbang")
			give_item(id,"weapon_flashbang")
			give_item(id,"weapon_smokegrenade")
			
			if (HasC4[id])
			{
				give_item(id, "weapon_c4");
				cs_set_user_plant( id );
			}
			
			if (get_user_team(id) == 2)
			{
				give_item(id, "item_thighpack");
			}
			
		}
		case 3:
		{
			if (user_has_weapon(id, CSW_C4) && get_user_team(id) == 1)
				HasC4[id] = true;
			else
				HasC4[id] = false;
				
			strip_user_weapons(id)
			give_item(id, "weapon_knife");
			give_item(id, "weapon_awp")  
			give_item(id,"ammo_338magnum")
			give_item(id,"ammo_338magnum")
			give_item(id,"ammo_338magnum")
			give_item(id,"ammo_338magnum")
			give_item(id,"weapon_deagle")
			give_item(id,"ammo_50ae")
			give_item(id,"ammo_50ae")
			give_item(id,"ammo_50ae")
			give_item(id,"ammo_50ae")
			give_item(id,"ammo_50ae")
			give_item(id,"ammo_50ae")
			give_item(id,"ammo_50ae")
			give_item(id,"weapon_hegrenade")
			give_item(id,"weapon_flashbang")
			give_item(id,"weapon_flashbang")
			give_item(id,"weapon_smokegrenade")
			
			if (HasC4[id])
			{
				give_item(id, "weapon_c4");
				cs_set_user_plant( id );
			}
			
			if (get_user_team(id) == 2)
			{
				give_item(id, "item_thighpack");
			}
			
		}
	}
	return PLUGIN_CONTINUE;
}
public daj(id){
	
	
	if(runda>=3)
	{
		if(get_user_flags(id) & FLAGA)
		{
			if(is_user_alive(id))
			{
				
				
				set_task(1.0, "func_menu", id)
			
			}
		}
	}
	
	if(runda>=0)
	{
		if(get_user_flags(id) & FLAGA)
		{
			if(is_user_alive(id))
			{
				
				
			
				set_user_health(id, get_user_health(id)+5);
				cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM)
			}
			if(get_user_team(id)==2 && get_user_flags(id) & FLAGA)

			give_item(id, "item_thighpack");
		}
	}
}
public Runda(id)
{
	runda++
}
//Motd
public ShowMotd(id){
	show_motd(id, "vip.txt", "Informacje o vipie");
}

public MessageScoreAttrib(iMsgID, iDest, iReceiver)
{   
    new iPlayer = get_msg_arg_int(1);
    if( is_user_connected( iPlayer )   && ( get_user_flags( iPlayer ) & FLAGA ) )
    {
        set_msg_arg_int( 2, ARG_BYTE, is_user_alive( iPlayer ) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD );    
    }
}

public client_putinserver(id)
{
    if(get_user_flags(id) & FLAGA)
    {
		new name[32]
		get_user_name(id,name,31)	    
	    
		set_hudmessage(255, 0, 0, -1.0, 0.25, 0, 1.0, 2.0, 0.1, 0.2, 2);
		show_hudmessage(0, "Przychodzi Vip^n %s^n Witamy!!!",name)    
	    
		client_cmd(0,"spk misc/vip")
    }
}
 

public hook_death()
{
   // Killer id
   nKiller = read_data(1)
   
   if ( (read_data(3) == 1) && (read_data(5) == 0) )
   {
      nHp_add = get_pcvar_num (health_hs_add)
   }
   else
      nHp_add = get_pcvar_num (health_add)
   nHp_max = get_pcvar_num (health_max)
   // Updating Killer HP
   if(!(get_user_flags(nKiller) & ADMIN_LEVEL_H))
   return;

   nKiller_hp = get_user_health(nKiller)
   nKiller_hp += nHp_add
   // Maximum HP check
   if (nKiller_hp > nHp_max) nKiller_hp = nHp_max
   set_user_health(nKiller, nKiller_hp)
   // Hud message "Healed +15/+30 hp"
   set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1)
   show_hudmessage(nKiller, "Healed +%d hp", nHp_add)
   // Screen fading
   message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, nKiller)
   write_short(1<<10)
   write_short(1<<10)
   write_short(0x0000)
   write_byte(0)
   write_byte(0)
   write_byte(200)
   write_byte(75)
   message_end()
 
}

Jak dodać drugą flage do vipa z generatora

19.06.2017 10:25

xxx

Nie wczytuje nazwy z .txt

06.06.2017 06:19

Problem z ExtremeBanConfig 3.0 beta

 

L 06/06/2017 - 07:15:43: [AMXX] Language key "WORD_OWN2" not found for language "pl", check "extreme_bancfg3.amxx"

.sma

new szTemp[REASON_LEN+1];
new szOwn[32];
formatex(szOwn, 31, "[%L]",LANG_SERVER, "WORD_OWN2");

.txt

[pl]
DEFAULT_REASON = Bez powodu
WORD_OWN2 = Wlasny
INFO_BANNED = Ban zostal dodany
INFO_UNBANNED = Gracz %s zostal odbanowany
INFO_DURING_KICK = Masz bana. Sprawdz konsole !
INFO_HUD = Gracz %s zostal zbanowany^nprzez admina %s^n%s^nPowod: %s
INFO_CHOOSE_PLAYER = Najpierw wybierz gracza
WORD_RETURN = Powrot

Dodam iż tylko tego argumentu nie wczytuje, reszta jest ok.

 

Problem z Hltv, wychodzi z serwera

05.06.2017 21:39

Mam problem z HLTV, wychodzi z serwera zazwyczaj po zmianie mapy ( po minięciu tych 20 minut, czasem po dwóch mapach )

Po zmianie mapy za pośrednictwem admina, hltv nie wychodzi.

w konsoli mam takie coś. 

L 06/05/2017 - 22:15:42: "HLTV-GameForest.pl<585><HLTV><>" entered the game
L 06/05/2017 - 22:15:42: "HLTV-GameForest.pl<585><HLTV><>" joined team "SPECTATOR"
L 06/05/2017 - 22:16:25: [DPROTO]: Client "HLTV-GameForest.pl" timed out for 43.2789sec
SZ_GetSpace: overflow on HLTV-GameForest.pl
L 06/05/2017 - 22:16:42: "HLTV-GameForest.pl<585><HLTV><SPECTATOR>" disconnected
L 06/05/2017 - 22:16:42: World triggered "Round_Draw" (CT "0") (T "0")
L 06/05/2017 - 22:16:42: World triggered "Round_End"
Dropped HLTV-GameForest.pl from server

Nie jestem pewien ale to dlatego, że za dużo informacji do niego jest wysyłanych?

Mam jeden plugin z wykorzystywaniem dhud, jednak mam wykluczone HLTV

 

jakistamplugin.sma

czesc kodu : 

new maxpl = get_maxplayers();
for (new pl = 1; pl <= maxpl; pl++)
{
if (is_user_connected(pl) && !is_user_bot(pl) && is_user_hltv(pl))


blablabla


}