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
 

Zdjęcie

Problem z Pluginem ;d


  • Zamknięty Temat jest zamknięty
11 odpowiedzi w tym temacie

#1 Misiaczek ;c

    /dev/null

  • Moderator

Reputacja: 1 678
Godlike

  • Postów:2 496
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Halemba
Offline

Napisano 08.04.2009 13:12

Witam, mam problem ze swoim pluginem a mianowicie iz jak jest więcej graczy to wywala każdego co runda bo tak jakby serwer nie nadążał z modelami xD oraz pytanie jak wyłączyć efekt smoka(tzn dym) bo nie potrzebny mi dym xD bo dziwnie to wygląda jak piłka sie kopci :D

tu macie sma ;f
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <fun>

new WERSJA[] = "0.6"
new MODEL_GRANAT_WSZYSCY[] = "models/pzb_dr/p_granat.mdl"
new MODEL_GRANAT_GRACZ[] = "models/pzb_dr/v_granat.mdl"
new MODEL_NOZ_WSZYSCY[] = "models/pzb_dr/p_noz.mdl"
new MODEL_NOZ_GRACZ[] = "models/pzb_dr/v_noz.mdl"

public plugin_init()
{
        register_plugin("PzB DR", WERSJA, "Mis")
        register_event("ResetHUD", "vip", "b")
        register_event("ResetHUD",  "admin", "b")
        register_event("ResetHUD", "gracz", "b")
        register_logevent("granat", 2, "1=Round_Start")
        register_clcmd("say /wersja", "wersja")
        register_forward(FM_SetModel,"granat_model")
        register_event("CurWeapon","granat_model_zmiana","be","1=1")
        register_forward(FM_SetModel,"noz_model")
        register_event("CurWeapon","noz_model_zmiana","be","1=1")
        return PLUGIN_CONTINUE
}

fnGreenChat( plr, const message[], {Float,Sql,Result,_}:... )
{
    static max_players, svc_saytext;
    if( !max_players )
        max_players = get_maxplayers( );
    if( !svc_saytext )
        svc_saytext = get_user_msgid( "SayText" );

    static msg[192];
    msg[0] = 0x04;

    vformat( msg[1], sizeof msg - 2, message, 3 );

    if( plr > 0 && plr <= max_players )
    {
        message_begin( MSG_ONE, svc_saytext, { 0, 0, 0 }, plr );
        write_byte( plr );
        write_string( msg );
        message_end( );
    }
    else if( plr == 0 )
    {
        for( new i = 1 ; i <= max_players ; i++ )
        {
            if( is_user_connected( i ) )
            {
                message_begin( MSG_ONE, svc_saytext, { 0, 0, 0 }, i );
                write_byte( i );
                write_string( msg );
                message_end( );
            }
        }
    }

    return 1;
}

public has_flags(id,string[])
{
    new ret=1
    new byte

    new len = strlen(string)
    new p_flag = get_user_flags(id)

    for(new i=0;i<=len;i++)
    {
        if(string[i]>='a' && string[i]<='z') byte = (1<<(string[i]-'a'))
        else if(string[i]>='A' && string[i]<='Z') byte = (1<<(string[i]-'A'))
        else if(string[i]==',' && ret==1) return 1
        else if(string[i]==',') ret=1
        if(byte!=0 && !(p_flag & byte)) ret=0

        byte=0
    }

    return ret
}

public admin(id, level, cid)
{
        if (has_flag(id,"d"))
	{
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T)
		{
                        cs_set_user_model(id, "pzb_admte")
                }
                else if(userTeam == CS_TEAM_CT)
		{
                        cs_set_user_model(id, "pzb_admct")
                }
                else
		{
                        cs_reset_user_model(id)
                }
        }
        return PLUGIN_CONTINUE
}

public wersja(id)
{
	fnGreenChat(id, "Serwer Uzywa Pluginu PzB DR w wersji %d by Mis", WERSJA)
}

public vip(id, level, cid)
{
        if (has_flag(id,"b"))
	{
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T)
		{
                        cs_set_user_model(id, "pzb_vipte")
                }
                else if(userTeam == CS_TEAM_CT)
		{
                        cs_set_user_model(id, "pzb_vipct")
                }
                else
		{
                        cs_reset_user_model(id)
                }
        }
        return PLUGIN_CONTINUE
}

public gracz(id, level, cid)
{
        if (has_flag(id,"z"))
	{
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T)
		{
                        cs_set_user_model(id, "pzb_grate")
                }
                else if(userTeam == CS_TEAM_CT)
		{
                        cs_set_user_model(id, "pzb_gract")
                }
                else
		{
                        cs_reset_user_model(id)
                }
        }
        return PLUGIN_CONTINUE
}

public granat(id)
{
    new players[32], player, pnum;
    get_players(players, pnum, "a");
    for(new i = 0; i < pnum; i++)
    {
        player = players[i];
        if (has_flag(id,"a,b,z"))
        {
            give_item(player, "weapon_smokegrenade")
        }
    }
}

public granat_model(entity,const model[])
{
	if(!pev_valid(entity))
	{
		return FMRES_IGNORED
	}
	if(equali(model,"models/w_smokegrenade.mdl"))
	{
		engfunc(EngFunc_SetModel,entity,MODEL_GRANAT_WSZYSCY)
		return FMRES_SUPERCEDE
	}
	return FMRES_IGNORED
}

public granat_model_zmiana(id)
{
	new weapon_id = read_data(2)
	if(weapon_id == CSW_SMOKEGRENADE)
	{
		set_pev(id, pev_viewmodel, engfunc(EngFunc_AllocString, MODEL_GRANAT_GRACZ))
	}
}

public noz_model(entity,const model[])
{
	if(!pev_valid(entity))
	{
		return FMRES_IGNORED
	}
	if(equali(model,"models/w_knife.mdl"))
	{
		engfunc(EngFunc_SetModel,entity,MODEL_NOZ_WSZYSCY)
		return FMRES_SUPERCEDE
	}
	return FMRES_IGNORED
}

public noz_model_zmiana(id)
{
	new weapon_id = read_data(2)
	if(weapon_id == CSW_KNIFE)
	{
		set_pev(id, pev_viewmodel, engfunc(EngFunc_AllocString, MODEL_NOZ_GRACZ))
	}
}

public plugin_precache()
{	
        precache_model("models/player/pzb_vipct/pzb_vipct.mdl")
        precache_model("models/player/pzb_vipte/pzb_vipte.mdl")
        precache_model("models/player/pzb_admct/pzb_admct.mdl")
        precache_model("models/player/pzb_admte/pzb_admte.mdl")
        precache_model("models/player/pzb_gract/pzb_gract.mdl")
        precache_model("models/player/pzb_grate/pzb_grate.mdl")	
        precache_model("models/player/pzb_vipte/pzb_vipteT.mdl")	
        precache_model("models/player/pzb_grate/pzb_grateT.mdl")
        engfunc(EngFunc_PrecacheModel,MODEL_GRANAT_WSZYSCY)
        engfunc(EngFunc_PrecacheModel,MODEL_GRANAT_GRACZ)
        engfunc(EngFunc_PrecacheModel,MODEL_NOZ_WSZYSCY)
        engfunc(EngFunc_PrecacheModel,MODEL_NOZ_GRACZ)	
        return PLUGIN_CONTINUE
}

  • +
  • -
  • 0

#2 Klycior

    Wszechpomocny

  • Użytkownik

Reputacja: 43
Pomocny

  • Postów:370
  • GG:
  • Lokalizacja:Tarnowskie Góry
Offline

Napisano 08.04.2009 14:21

Chodzi Ci o w_smokegrenade.mdl ?
  • +
  • -
  • 0

#3 Misiaczek ;c

    /dev/null

  • Autor tematu
  • Moderator

Reputacja: 1 678
Godlike

  • Postów:2 496
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Halemba
Offline

Napisano 08.04.2009 14:25

Klycior, czytaj uwaznie
1. rozlancza graczy co nowa rundę bo serwer nie na daza z podmiana wszystkich modeli ;d
2. chce wyłączyć efekt dymu ;d z granata dymnego ;d
  • +
  • -
  • 0

#4 bakul. <3

    Wszechmogący

  • Użytkownik

Reputacja: 88
Zaawansowany

  • Postów:612
  • GG:
  • Imię:Przemek
  • Lokalizacja:Warszawa
Offline

Napisano 08.04.2009 14:32

Mi$^, nie ma nic w logach?
  • +
  • -
  • 0

#5 Klycior

    Wszechpomocny

  • Użytkownik

Reputacja: 43
Pomocny

  • Postów:370
  • GG:
  • Lokalizacja:Tarnowskie Góry
Offline

Napisano 08.04.2009 14:38

Załącznik.

Nie testowane.

Daj znać czy działa.

Załączone pliki


  • +
  • -
  • 0

#6 Misiaczek ;c

    /dev/null

  • Autor tematu
  • Moderator

Reputacja: 1 678
Godlike

  • Postów:2 496
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Halemba
Offline

Napisano 08.04.2009 14:40

Logi :f
L 04/08/2009 - 13:52:57: [CSTRIKE] Invalid player 2
L 04/08/2009 - 13:52:57: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:52:57: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/08/2009 - 13:52:57: [CSTRIKE] Invalid player 3
L 04/08/2009 - 13:52:57: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:52:57: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/08/2009 - 13:52:57: [CSTRIKE] Invalid player 4
L 04/08/2009 - 13:52:57: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:52:57: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/08/2009 - 13:52:57: [CSTRIKE] Invalid player 5
L 04/08/2009 - 13:52:57: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:52:57: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/08/2009 - 13:52:57: [CSTRIKE] Invalid player 6
L 04/08/2009 - 13:52:57: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:52:57: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/08/2009 - 13:52:57: [CSTRIKE] Invalid player 7
L 04/08/2009 - 13:52:57: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:52:57: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/08/2009 - 13:52:57: [CSTRIKE] Invalid player 8
L 04/08/2009 - 13:52:57: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:52:57: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/08/2009 - 13:52:57: [CSTRIKE] Invalid player 9
L 04/08/2009 - 13:52:57: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:52:57: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/08/2009 - 13:52:57: [CSTRIKE] Invalid player 10
L 04/08/2009 - 13:52:57: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:52:57: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/08/2009 - 13:52:57: [CSTRIKE] Invalid player 13
L 04/08/2009 - 13:52:57: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:52:57: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/08/2009 - 13:52:57: [CSTRIKE] Invalid player 13
L 04/08/2009 - 13:52:57: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:52:57: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/08/2009 - 13:52:57: [CSTRIKE] Invalid player 14
L 04/08/2009 - 13:52:57: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:52:57: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/08/2009 - 13:52:57: [CSTRIKE] Invalid player 16
L 04/08/2009 - 13:52:57: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:52:57: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/08/2009 - 13:52:57: [CSTRIKE] Invalid player 17
L 04/08/2009 - 13:52:57: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:52:57: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/08/2009 - 13:52:57: [CSTRIKE] Invalid player 17
L 04/08/2009 - 13:52:57: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:52:57: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/08/2009 - 13:52:57: [CSTRIKE] Invalid player 20
L 04/08/2009 - 13:52:57: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:52:57: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/08/2009 - 13:52:57: [CSTRIKE] Invalid player 20
L 04/08/2009 - 13:52:57: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:52:57: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/08/2009 - 13:53:02: [CSTRIKE] Invalid player 4
L 04/08/2009 - 13:53:02: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:53:02: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/08/2009 - 13:53:02: [CSTRIKE] Invalid player 8
L 04/08/2009 - 13:53:02: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:53:02: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/08/2009 - 13:53:02: [CSTRIKE] Invalid player 12
L 04/08/2009 - 13:53:02: [AMXX] Run time error 10 (plugin "vip.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/08/2009 - 13:53:02: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).

Klycior, powiedz co tam zmieniłeś ;f
  • +
  • -
  • 0

#7 Klycior

    Wszechpomocny

  • Użytkownik

Reputacja: 43
Pomocny

  • Postów:370
  • GG:
  • Lokalizacja:Tarnowskie Góry
Offline

Napisano 08.04.2009 14:43

W logach masz błąd z pluginem vip.amxx

Sprawdź czy działa a nie pytaj co zmieniłem ;)
  • +
  • -
  • 0

#8 Misiaczek ;c

    /dev/null

  • Autor tematu
  • Moderator

Reputacja: 1 678
Godlike

  • Postów:2 496
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Halemba
Offline

Napisano 08.04.2009 14:45

Klycior, pytam bo po to pisze plugin żeby sie czegos nauczyć O.o a nie ze ktoś mi poprawi błędy i będę szczęśliwy
  • +
  • -
  • 0

#9 MafiaDL

    Naj-Najstarszy Moderator

  • Przyjaciel

Reputacja: 561
Wszechwiedzący

  • Postów:3 492
  • GG:
  • Imię:Łukasz
  • Lokalizacja:Warsaw
Offline

Napisano 08.04.2009 14:59

Klycior, jezeli pomagasz to podaj jeszcze sma
  • +
  • -
  • 0

#10 Misiaczek ;c

    /dev/null

  • Autor tematu
  • Moderator

Reputacja: 1 678
Godlike

  • Postów:2 496
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Halemba
Offline

Napisano 08.04.2009 15:06

Dobra postanowiłem zamienić to:
public admin(id, level, cid)
{
        if (has_flag(id,"d"))
    {
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T)
        {
                        cs_set_user_model(id, "pzb_admte")
                }
                else if(userTeam == CS_TEAM_CT)
        {
                        cs_set_user_model(id, "pzb_admct")
                }
                else
        {
                        cs_reset_user_model(id)
                }
        }
        return PLUGIN_CONTINUE
}

public vip(id, level, cid)
{
        if (has_flag(id,"b"))
    {
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T)
        {
                        cs_set_user_model(id, "pzb_vipte")
                }
                else if(userTeam == CS_TEAM_CT)
        {
                        cs_set_user_model(id, "pzb_vipct")
                }
                else
        {
                        cs_reset_user_model(id)
                }
        }
        return PLUGIN_CONTINUE
}

public gracz(id, level, cid)
{
        if (has_flag(id,"z"))
    {
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T)
        {
                        cs_set_user_model(id, "pzb_grate")
                }
                else if(userTeam == CS_TEAM_CT)
        {
                        cs_set_user_model(id, "pzb_gract")
                }
                else
        {
                        cs_reset_user_model(id)
                }
        }
        return PLUGIN_CONTINUE
}

na to:
public admin(id, level, cid)
{
    if (has_flag(id,"d"))
    {
        new team[32]
        read_data(2,team,31)

        if(equal("TERRORIST",team)) cs_set_user_model(id,"pzb_admte")
        if(equal("CT",team)) cs_set_user_model(id,"pzb_admct")
    }
}

public vip(id, level, cid)
{
    if (has_flag(id,"b"))
    {
        new team[32]
        read_data(2,team,31)

        if(equal("TERRORIST",team)) cs_set_user_model(id,"pzb_vipte")
        if(equal("CT",team)) cs_set_user_model(id,"pzb_vipct")
    }
}

public gracz(id, level, cid)
{
    if (has_flag(id,"z"))
    {
        new team[32]
        read_data(2,team,31)

        if(equal("TERRORIST",team)) cs_set_user_model(id,"pzb_grate")
        if(equal("CT",team)) cs_set_user_model(id,"pzb_gract")
    }
}

teraz nie powinien chyba błąd wywalać ;P

[ Dodano: 08-04-2009, 20:14 ]
Przperpaszam odrazu za dubla ;P więc został tylko jedem problem xD jak wyłączyc dym w smokegranade bo to dziwnie wyglada jak pilka dymi :D
  • +
  • -
  • 0

#11 Miczu

    Godlike

  • Przyjaciel

Reputacja: 657
Wszechmogący

  • Postów:2 862
Offline

Napisano 08.04.2009 20:06

Daj screena i napisz czy masz pluga/modyfikowales cos z granatami...
  • +
  • -
  • 0

#12 Misiaczek ;c

    /dev/null

  • Autor tematu
  • Moderator

Reputacja: 1 678
Godlike

  • Postów:2 496
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Halemba
Offline

Napisano 08.04.2009 21:21

Miczu, dodaj sma w załączniku xD bo teraz się mi coś cały plugin spi***** nie daje granata :/ nie podmienia modeli :/ po prostu nie reaguje ;F

Ps. nie zwracajcie uwagi na komentarze po // :D bo to tak tylko dla mnie zeby sie orientował co do czego ;P

Załączone pliki


  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych