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
 

imib87 - zdjęcie

imib87

Rejestracja: 27.07.2017
Aktualnie: Nieaktywny
Poza forum Ostatnio: 05.03.2022 21:34
-----

Moje tematy

Dźwięk defowania C4

19.02.2022 18:24

Nie ma tego dźwięku na serwerze, kiedyś używałem pluginów do blokowania 'E' 

#include <amxmodx>
#include <fakemeta>

#define VERSION	"0.3"

new const useSound[ ] = "common/wpn_denyselect.wav";

public plugin_init( )
{
	register_plugin( "USE Sound Blocker", VERSION, "3Di" );
	
	register_forward( FM_EmitSound, "handleSound" );
}

public handleSound( id, Channel, defaultSound[ ] )
{
	if ( equal ( defaultSound, useSound ) )
	{
		static iButtons, iButtonsCheck;
		
		iButtons = get_uc( 0, UC_Buttons );
		iButtonsCheck = pev( id, pev_oldbuttons );
		
		if ( ( iButtons & IN_USE ) && !( iButtonsCheck & IN_USE ) ) 
		{
			client_print( id, print_chat , "* 'USE' Sound Blocked *" );
		}
		
		return FMRES_SUPERCEDE;
	}  
	
	return FMRES_IGNORED;
}

W późniejszym czasie wrzuciłem ten kod do spadochronu powstało

#include <amxmodx>
#include <reapi>
#define    get_bit(%1,%2)    (%1 & (1 << (%2 & 31)))
#define    set_bit(%1,%2)    %1 |= (1 << (%2 & 31))
#define    clr_bit(%1,%2)    %1 &= ~(1 << (%2 & 31))
new g_bitAlive;
const Float:fall_speed = -100.0
public plugin_init(){
    register_plugin("Parachute Lite [ReAPI]", "11.0", "Leo_[BH]");
    RegisterHookChain(RG_CBasePlayer_Spawn, "RG_Spawn_Post", 1);
    RegisterHookChain(RG_CBasePlayer_Killed, "RG_Player_Killed", 0);
    RegisterHookChain(RG_CBasePlayer_PreThink, "RG_client_PreThink");
}
public RG_Spawn_Post(id) if(is_user_alive(id)) set_bit(g_bitAlive, id);
public RG_Player_Killed(id) clr_bit(g_bitAlive, id);
public RG_client_PreThink(id){
    if(!get_bit(g_bitAlive, id)) return;
    if (get_entvar(id, var_gravity) == 0.1) set_entvar(id, var_gravity, 1.0);
    if (get_entvar(id, var_button) & IN_USE) {
        static Float:velocity[3]
        get_entvar(id, var_velocity, velocity);
        if (velocity[2] < 0.0) {
            set_entvar(id, var_gravity, 0.1);
            velocity[2] = (velocity[2] + 40.0 < fall_speed) ? velocity[2] + 40.0 : fall_speed ;
            set_entvar(id, var_velocity, velocity);
        }
    }
    else if ((get_entvar(id, var_oldbuttons) & IN_USE)) {
        set_entvar(id, var_gravity, 1.0);
    }
}
#if AMXX_VERSION_NUM < 183
public client_disconnect(id) clr_bit(g_bitAlive, id);
#else
public client_disconnected(id) clr_bit(g_bitAlive, id);
#endif

Aktualnie używany kod - dekompilator, bo kod źródłowy gdzieś leży w plikach

#pragma semicolon 1
#pragma ctrlchar '\'

new g_bitAlive;

bool:operator<(Float:,Float:)(Float:oper1, Float:oper2)
{
    return 0 > floatcmp(oper1, oper2);
}

public __reapi_version_check(majorVersion, minorVersion)
{
    if (majorVersion != 5)
    {
        new temp[512];
        formatex(temp, 511, "[ReAPI]: Api major version mismatch; expected %d, real %d", 5, majorVersion);
        set_fail_state(temp);
        return 0;
    }
    if (minorVersion < 2)
    {
        new temp[512];
        formatex(temp, 511, "[ReAPI]: Api minor version mismatch; expected at least %d, real %d", 2, minorVersion);
        set_fail_state(temp);
        return 0;
    }
    return 0;
}

public plugin_init()
{
    register_plugin("Parachute Lite [ReAPI]", "11.0", "Leo_[BH]");
    RegisterHookChain(3072, "RG_Spawn_Post", "");
    RegisterHookChain(3079, "RG_Player_Killed", 0);
    RegisterHookChain(3088, "RG_client_PreThink", 0);
    return 0;
}

public RG_Spawn_Post(id)
{
    if (is_user_alive(id))
    {
        g_bitAlive = 1 << id & 31 | g_bitAlive;
    }
    return 0;
}

public RG_Player_Killed(id)
{
    g_bitAlive = ~1 << id & 31 & g_bitAlive;
    return 0;
}

public RG_client_PreThink(id)
{
    !!! Removed Phi
    if (!1 << id & 31 & g_bitAlive)
    {
        return 0;
    }
    if (get_entvar(id, 5157) == 0.10/*1036831949*/)
    {
        set_entvar(id, 5157, 1.00/*1065353216*/);
    }
    if (get_entvar(id, 5178) & 32)
    {
        static Float:velocity[3];
        get_entvar(id, 5124, velocity);
        if (velocity[2][0] < 0.00)
        {
            set_entvar(id, 5157, 0.10/*1036831949*/);
            new var1;
            if (velocity[2][0] + 40.00 < -100.00/*-1027080192*/)
            {
                var1 = velocity[2][0] + 40.00;
            }
            else
            {
                var1 = -100.00/*-1027080192*/;
            }
            velocity[2] = var1;
            set_entvar(id, 5124, velocity);
        }
    }
    else
    {
        if (get_entvar(id, 5225) & 32)
        {
            set_entvar(id, 5157, 1.00/*1065353216*/);
        }
    }
    return 0;
}

public client_disconnect(id)
{
    g_bitAlive = ~1 << id & 31 & g_bitAlive;
    return 0;
}


Mimo to dźwięk use - wpn_denyselect , nie pojawia się w grze przy rozplantowywaniu C4 przez CT , gdzie jest winowajca? Plik do pobrania http://files.hldm.or.../sound/common/ 

Voice Manager 1.0.1

05.01.2022 20:19

Korzystam z https://github.com/T...ice_manager.smatej wersji, podczas instalacji wszysto przebiegło pomyślnie, tabelki się utworzyły i kiedy gracze się mutują wpis jest tworzony, problem jest w przypadku admina kiedy chciałby zmutować gracza wyskakuje komunikat , z kodu - "^x04[GLOS]^x01 Na serwerze nie ma nikogo, kogo moglbys zmutowac!");

Admin posiada flagi które mu umożliwiają korzystanie z komendy

Gracze posiadają vipa , tj tz - więc są graczami 

 

Niedawno na serwerze miałem problem z ustawieniem 

bind_pcvar_num(create_cvar("vm_admin_intervoice", "1"), cvarAdminInterVoice)

 

Koniec końców się udało, po parunastu próbach - nie mam pojęcia co jest problemem. 

Nadto dodam że na serwerze nie do końca ładowały się ustawienia kamer i thetime, buytime jak by nie czytało server.cfg po restarcie mapy. 

 

Wracajac do pluginu VM, działa poprawnie(info, zarzadzanie glosem zywi = martwi, /mute, prywatny czat @ i admin voice) oprócz amx_mute ,

 

Dodam jeszcze plugins.ini , plugin powedrowal na sama gore bo nie dzialal interadmin voice

; -----------------------------------------
; Amx Mod X 1.9.0.5294       |       Pukawka.pl
; -----------------------------------------

amxbans_core.amxx
amxbans_main.amxx
fresh_bans.amxx
VM.amxx				;zarzadzanie glosem + gag + baza mysql // logs/voice_manager

;admin.amxx		; admin base (required for any admin-related)
;admin_sql.amxx		; admin base - SQL version (comment admin.amxx)

; Basic
admincmd.amxx		; basic admin console commands
adminhelp.amxx		; help command for admin console commands
adminslots.amxx		; slot reservation
multilingual.amxx	; Multi-Lingual management

; Menus
menufront_end2.amxx
ReasonKicker.amxx		;powody kickow
cmdmenu.amxx		; command menu (speech, settings)
plmenu.amxx		; players menu (kick, ban, client cmds.)
;telemenu.amxx		; teleport menu (Fun Module required!)
mapsmenu.amxx		; maps menu (vote, changelevel)
pluginmenu.amxx		; Menus for commands/cvars organized by plugin

; Chat / Messages
antiflood.amxx		; prevent clients from chat-flooding the server
;adminvote.amxx		; vote commands

; Map related
nextmap.amxx		; displays next map in mapcycle
;mapchooser.amxx		; allows to vote for next map
timeleft.amxx		; displays time left on map

; Configuration
pausecfg.amxx		; allows to pause and unpause some plugins
statscfg.amxx		; allows to manage stats plugins via menu and commands

; Counter-Strike
restmenu.amxx		; restrict weapons menu
statsx.amxx		; stats on death or round end (CSX Module required!)
;miscstats.amxx		; bunch of events announcement for Counter-Strike
;stats_logging.amxx	; weapons stats logging (CSX Module required!)

[ROZWIĄZANE] problem z funkcjonowaniem vipa

28.11.2021 22:43

Co mam gdzie zrobic ,przejrzałem cale forum i te tematy typu https://amxx.pl/topi...a-z-generatora/

nie wiem nadal gdzie ten problem występuje

 

L 11/28/2021 - 22:05:22: Invalid array handle provided (0)
L 11/28/2021 - 22:05:22: [AMXX] Displaying debug trace (plugin "vip1.amxx", version "12.3.0.2")
L 11/28/2021 - 22:05:22: [AMXX] Run time error 10: native error (native "ArraySize")
L 11/28/2021 - 22:05:22: [AMXX]    [0] textCZCGOx.sma::client_disconnect_vip (line 76)
L 11/28/2021 - 22:05:22: [AMXX]    [1] textCZCGOx.sma::client_disconnected (line 68)
 
#include <amxmodx>
#include <colorchat>
#include <cstrike>
#include <csx>
#include <engine>
#include <fun>
#include <hamsandwich>
#include <fakemeta>
#include <stripweapons>

forward amxbans_admin_connect(id);

new Array:g_Array, CsArmorType:armortype, bool:g_Vip[33],gRound=0, maxPlayers,
menu, menu_callback_handler, weapon_id, g_Hudmsg;

new bool:wpisal[33];


public plugin_init(){
	register_plugin("VIP Ultimate", "12.3.0.2", "benio101 & speedkill");
	RegisterHam(Ham_Spawn, "player", "SpawnedEventPre", 1);
	register_event("DeathMsg", "DeathMsg", "a");
	register_event("CurWeapon","CurWeapon","be", "1=1");
	register_clcmd("say /modele", "ZmienModele");
	register_clcmd("say /vip", "ShowMotd");
	register_message(get_user_msgid("SayText"),"handleSayText");
	g_Hudmsg=CreateHudSyncObj();
	register_logevent("RoundEnd", 2, "1=Round_End");
}
public ZmienModele(id)
{
	wpisal[id]=!wpisal[id]
	ColorChat(id, RED, "[Modele]^1 %s niestandardowe modele!", wpisal[id]?"Wylaczyles":"Wlaczyles");
}
public client_authorized(id){
	if(get_user_flags(id) & 524288 == 524288){
		client_authorized_vip(id);
	}
}
public client_authorized_vip(id){
	g_Vip[id]=true;
	new g_Name[64];
	get_user_name(id,g_Name,charsmax(g_Name));
	
	new g_Size = ArraySize(g_Array);
	new szName[64];
	
	for(new i = 0; i < g_Size; i++){
		ArrayGetString(g_Array, i, szName, charsmax(szName));
		
		if(equal(g_Name, szName)){
			return 0;
		}
	}
	ArrayPushString(g_Array,g_Name);
	set_hudmessage(24, 190, 220, 0.25, 0.2, 0, 6.0, 6.0);
	ShowSyncHudMsg(0, g_Hudmsg, "Vip %s wbija na serwer !",g_Name);
	
	return PLUGIN_CONTINUE;
}
public client_disconnected(id){
    if(g_Vip[id]){
        client_disconnect_vip(id);
    }
}
public client_disconnect_vip(id){
	g_Vip[id]=false;
	new Name[64];
	get_user_name(id,Name,charsmax(Name));
	
	new g_Size = ArraySize(g_Array);
	new g_Name[64];
	
	for(new i = 0; i < g_Size; i++){
		ArrayGetString(g_Array, i, g_Name, charsmax(g_Name));
		
		if(equal(g_Name,Name)){
			ArrayDeleteItem(g_Array,i);
			break;
		}
	}
}
 

[ROZWIĄZANE] problem z kompilacja , statystyki

08.10.2021 13:58

//// players_stats.sma
// C:\Users\\Desktop\AMXX\AMXX_Studio_1.4.3_final\compiler182\players_stats.sma(700 -- 704) : error 075: input line too long (after substitutions)
// C:\Users\\Desktop\AMXX\AMXX_Studio_1.4.3_final\compiler182\players_stats.sma(708) : warning 217: loose indentation
// C:\Users\\Desktop\AMXX\AMXX_Studio_1.4.3_final\compiler182\players_stats.sma(708) : error 017: undefined symbol "hots"
// C:\Users\\Desktop\AMXX\AMXX_Studio_1.4.3_final\compiler182\players_stats.sma(708) : error 017: undefined symbol "d"
// C:\Users\\Desktop\AMXX\AMXX_Studio_1.4.3_final\compiler182\players_stats.sma(708) : error 029: invalid expression, assumed zero
// C:\Users\\Desktop\AMXX\AMXX_Studio_1.4.3_final\compiler182\players_stats.sma(708) : fatal error 107: too many error messages on one line
 
#if defined KillAssist	
	formatex(g_szQuery, charsmax(g_szQuery), 
		"INSERT INTO `players_stats` \
		(`nick`, `authid`, `frags`, `assists`, `deaths`, `hs`, `damage`, `shots`, `hits`, `bplanted`, `bdefused`, `bexploded`, `skill`, `gametime`, `harray`, `last_connection`) \
		VALUES ('%s', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%f', '%d', '%s', UNIX_TIMESTAMP(NOW())) \
		ON DUPLICATE KEY UPDATE `nick` = '%s', `frags` = `frags` + '%d', `assists` = `assists` + '%d', `deaths` = `deaths` + '%d', `hs` = `hs` + '%d', \
		`damage` = `damage` + '%d', `shots` = `shots` + '%d', `hits` = `hits` + '%d', \
		`bplanted` = `bplanted` + '%d', `bdefused` = `bdefused` + '%d', `bexploded` = `bexploded` + '%d', \
		`skill` = '%f', `gametime` = '%d', `harray` = '%s', `last_connection` = UNIX_TIMESTAMP(NOW()); ",
			name, g_arrPlayerData[id][AuthId], 
			g_arrPlayerData[id][Frags],
			g_arrPlayerData[id][aPlayers],
			g_arrPlayerData[id][Deaths], 
			g_arrPlayerData[id][HS],
			g_arrPlayerData[id][Damage],
			g_arrPlayerData[id][Shots],
			g_arrPlayerData[id][Hits],
			g_arrPlayerData[id][bPlanted],
			g_arrPlayerData[id][bDefused],
			g_arrPlayerData[id][bExploded],
			g_arrPlayerData[id][Skill],
			g_arrPlayerData[id][GameTime],
			hArray,
			name, 
			g_arrPlayerData[id][Frags],
			g_arrPlayerData[id][aPlayers],
			g_arrPlayerData[id][Deaths], 
			g_arrPlayerData[id][HS],
			g_arrPlayerData[id][Damage],
			g_arrPlayerData[id][Shots],
			g_arrPlayerData[id][Hits],
			g_arrPlayerData[id][bPlanted],
			g_arrPlayerData[id][bDefused],
			g_arrPlayerData[id][bExploded],
			g_arrPlayerData[id][Skill],
			g_arrPlayerData[id][GameTime],
			hArray
	);

 

[ROZWIĄZANE] error 017: undefined symbol VIP

14.09.2021 13:49

Witam, mam problem który pewnie okaże się prostszy niż myślałem ale nie mogę sobie z nim sam poradzić.. 

error 017: undefined symbol "wpisal"
\AMXX_Studio_1.4.3_final\compiler182\test123.sma(34) : warning 215: expression has no effect
AMXX\AMXX_Studio_1.4.3_final\compiler182\test123.sma(34) : error 001: expected token: ";", but found "]"
\Desktop\AMXX\AMXX_Studio_1.4.3_final\compiler182\test123.sma(34) : error 029: invalid expression, assumed zero

kod

 

 

public ZmienModele(id)

{
wpisal[id] = !wpisal[id];
ColorChat(id, GREEN, "[modele]^1 %s niestandardowe modele!", wpisal[id]?"Wylaczyles":"Wlaczyles");
}

 

Proszę o szybką edycje ;]