Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

Mr. Kapuczin

Użytkownik
  • Postów

    20
  • Dołączył

  • Ostatnia wizyta

Odpowiedzi opublikowane przez Mr. Kapuczin

  1. Siemka, skompiluje ktos to?

    public void Teamswitch_RoundStart()
    {
    	LoopAllPlayers(i)
    	{
    		if(!IsClientReplay(i) && !IsClientSourceTV(i) && GetClientTeam(i) != 1)
    		{	
    			if(GetClientTeam(i) == BUILDERS)
    				g_bWasBuilderThisRound[i] = true;
    			else
    				g_bWasBuilderThisRound[i] = false;
    		}
    	}
    }
    
    public void Teamswitch_PlayerSpawn(int client)
    {
    	if(IsBuildTime() || IsPrepTime())
    	{
    		if(GetClientTeam(client) == BUILDERS)
    			g_bWasBuilderThisRound[client] = true;
    	}
    }
    
    public void Teamswitch_RoundEnd()
    {
    
    	LoopAllPlayers(i)
    	{
    		if(!IsClientReplay(i) && !IsClientSourceTV(i) && GetClientTeam(i) != 1)
    		{
    			if(g_bWasBuilderThisRound[i])
    			{
    				CS_SwitchTeam(i, ZOMBIES);
    			}
    			else
    			{
    				CS_SwitchTeam(i, BUILDERS);
    			}
    		
    			g_bWasBuilderThisRound[i] = false;
    		}
    	}
    
    }
    
    public void TeamSwitch_OnClientPutInServer(int client)
    {
    	g_bWasBuilderThisRound[client] = false;
    }

     

     

    Potrzebuje bardzo

    i zeby to zrobic jako osobny plugin

     

  2. 5 godzin temu, ogbudowa napisał:
    
    #include <sourcemod>
    
    #include <cstrike>
    
    #include <sdktools>
    
    
    
    #define freeze_time 3.0
    
    #define freeze_sound "physics/glass/glass_impact_bullet4.wav"
    
    
    
    float g_freeze_time[MAXPLAYERS + 1] = {0.0, ...}
    
    
    
    public OnPluginStart()
    
    {
    
        HookEvent("player_hurt", player_hurt);
    
    }
    
    
    
    public OnMapStart()
    
    {
    
        PrecacheSound(freeze_sound, true);
    
    }
    
    
    
    public Action player_hurt(Event e, const char[] n, bool b)
    
    {
    
        char weapon[256];
    
        GetEventString(e, "weapon", weapon, sizeof(weapon));
    
        if (strlen(weapon) > 0)
    
        {
    
            int vic = GetClientOfUserId(GetEventInt(e, "userid"));
    
            float vec[3];
    
            GetClientAbsOrigin(vic, vec);
    
            EmitAmbientSound(freeze_sound, vec, vic, SNDLEVEL_RAIDSIREN);
    
            g_freeze_time[vic] = freeze_time;
    
            freeze_player(vic);
    
            CreateTimer(1.0, freeze_timer, vic, TIMER_REPEAT);  
    
        }
    
        return Plugin_Continue;
    
    }
    
    
    
    public Action freeze_player(int client)
    
    {
    
        SetEntityMoveType(client, MOVETYPE_NONE);
    
        SetEntityRenderColor(client, 0, 128, 255, 192);
    
    }
    
    
    
    public Action unfreeze_player(int client)
    
    {
    
        SetEntityMoveType(client, MOVETYPE_WALK);
    
        SetEntityRenderColor(client, 255, 255, 255, 255);
    
    }
    
    
    
    public Action freeze_timer(Handle timer, int vic)
    
    {
    
        if (g_freeze_time[vic] == 0.0)
    
        {
    
            unfreeze_player(vic);
    
            KillTimer(timer);
    
            return Plugin_Stop;
    
        }
    
        g_freeze_time[vic]--;
    
        return Plugin_Continue;
    
    }

    powinno działać

    nie dziala odmrazanie ?

    Cytat

    #include <sourcemod>
    #include <sdkhooks>
    #include <sdktools>
    #include <cstrike>

    // [define]
    #define freeze_time 0.2 // i tu trzeba zmieniac czas

    #define freeze_sound "physics/glass/glass_impact_bullet4.wav"


    public Plugin:myinfo =
    {
        name = "Zamrazajace naboje",
        author = "Nieznany",
        description = "Zamrazajace naboje",
        version = "---",
        url = "batcave.pro"
    };

    float g_freeze_time[MAXPLAYERS + 1] = {0.0, ...}

    public OnPluginStart()

    {

        HookEvent("player_hurt", player_hurt);

    }

    public OnMapStart()

    {

        PrecacheSound(freeze_sound, true);

    }

    public Action player_hurt(Event e, const char[] n, bool b)

    {

        char weapon[256];

        GetEventString(e, "weapon", weapon, sizeof(weapon));

        if (strlen(weapon) > 0)

        {

            int vic = GetClientOfUserId(GetEventInt(e, "userid"));

            float vec[3];

            GetClientAbsOrigin(vic, vec);

            EmitAmbientSound(freeze_sound, vec, vic, SNDLEVEL_RAIDSIREN);

            g_freeze_time[vic] = freeze_time;

            freeze_player(vic);

            CreateTimer(1.0, freeze_timer, vic, TIMER_REPEAT);  

        }

        return Plugin_Continue;

    }

    public Action freeze_player(int client)

    {

        SetEntityMoveType(client, MOVETYPE_NONE);

        SetEntityRenderColor(client, 0, 128, 255, 192);

    }

    public Action unfreeze_player(int client)

    {

        SetEntityMoveType(client, MOVETYPE_WALK);

        SetEntityRenderColor(client, 255, 255, 255, 255);

    }

    public Action freeze_timer(Handle timer, int vic)

    {

        if (g_freeze_time[vic] == 0.2) // tu zmieniac czas

        {

            unfreeze_player(vic);

            KillTimer(timer);

            return Plugin_Stop;

        }

        g_freeze_time[vic]--;

        return Plugin_Continue;

    }

     

  3. #include <sourcemod>
    #include <sdkhooks>
    #include <sdktools>
    
    public void OnPluginStart()
    {
    	for (int i = 1; i <= MaxClients; i++)
    	{
    		if (IsClientInGame(i))
    		{
    			SDKHook(i, SDKHook_OnTakeDamage, OnTakeDamage);
    		}
    	}
    }
    
    public void OnClientPutInServer(int client)
    {
    	if (!IsFakeClient(client))
    	{
    		return;
    	}
    	
    	SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
    }
    
    public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype, int &weapon, float damageForce[3], float damagePosition[3])
    {
    	char sWeaponName[64];
    	GetEntityClassname(weapon, sWeaponName, sizeof(sWeaponName));
    	
    	if (StrEqual(sWeaponName, "weapon_deagle"))
    	{
    		damage += 20;
    		return Plugin_Changed;
    	}
    	
    	return Plugin_Continue;
    }

    Da rade przerobic plugin by nie zadawal w ogole dmg? pls

  4. Siemka, moglby ktos napisac plugin, ktory by dzialal w taki sposob

    2 graczy , to przenosi 1 do ct, 2 do tt 

    3 graczy - 1 przenosi do tt, 2 przenosi do ct

    4 graczy - 1 przenosi do tt,  3przenosic do ct

    5 graczy - 1 przenosi do tt, 4 przenosi do ct

    6 graczy - 2 przenosi do tt, 4 przenosi do ct

    7 graczy - 2 przenosi do tt, 5 przenosi do ct

    8 graczy - 2 przenosi do tt, 6 przenosi do ct

    9 graczy - 2 przenosi do tt,  7 przenosi do ct

    10 graczy - 2 przenosi do tt, 8 do ct 

    ?

    Lub przerobic jakis gotowy? Blaagam

×
×
  • Dodaj nową pozycję...