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

bf2 przerobione nie działa


  • Zamknięty Temat jest zamknięty
Brak odpowiedzi do tego tematu

#1 Duacz

    Banned

  • Zbanowany

Reputacja: 1
Nowy

  • Postów:37
Offline

Napisano 13.03.2011 15:12

Witam !
Chciałem, zrobić sobie teraz pod najnowsze bf2 v1.05 większy dmg z awp. W pisaniu pluginu pomógł mi wcześniej peku33. Link do tematu http://www.forums.wiaderko.com/pisanie-pluginow-amxx/215747-przerobienie-pluginu.html Tak wygląda mój badgepowers.inl

//Bf2 Rank Mod badge powers File
//Contains all the power giving etc checking functions.

#if defined bf2_powers_included
  #endinput
#endif
#define bf2_powers_included
new bool:moredmg[33];
public Ham_dmg(victim, attacker, Float:damage, Float:direction[3], ptr, bits) 
{
	if(is_user_connected(attacker) && get_user_weapon(attacker) == CSW_AWP && moredmg[attacker])
	{
		SetHamParamFloat(3, damage * 1.4);
		return HAM_OVERRIDE;
	}
	return HAM_IGNORED;
}
public set_speed(id)
{
    if ( !get_pcvar_num(gPcvarBadgesActive) || !get_pcvar_num(gPcvarBadgePowers) ) return;
    if ( !is_user_alive(id) || freezetime ) return;

    new Float:speed;

    if ( g_imobile[id] )
    {
        speed = 100.0;
    }
    else
    {
        if ( cs_get_user_vip(id) )
        {
            //VIPs only have 1 speed no matter the weapon
            speed = 227.0;
        }
        else
        {
            new weapon = get_user_weapon(id);

            speed = gCSWeaponSpeed[weapon];

            if ( gCurrentFOV[id] <= 45 )
            {
                switch(weapon)
                {
                    case CSW_SCOUT: speed = 220.0;
                    case CSW_SG550, CSW_AWP, CSW_G3SG1: speed = 150.0;
                }
            }
        }

        new smglevel = g_PlayerBadges[id][BADGE_SMG];
        if ( smglevel )
        {
            //15 units faster per level.
            speed += (smglevel * 15.0);
        }
    }

    if ( speed != get_user_maxspeed(id) )
    {
        set_user_maxspeed(id, speed);
    }
}

public set_invis(id)
{
    if ( !get_pcvar_num(gPcvarBadgesActive) || !get_pcvar_num(gPcvarBadgePowers) ) return;
    if ( !is_user_alive(id) ) return;

    new shotgunlevel = g_PlayerBadges[id][BADGE_SHOTGUN];

    if ( shotgunlevel && get_user_weapon(id) == CSW_KNIFE )
    {
        fm_set_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransTexture, gInvisAlphaValue[shotgunlevel-1]);
        g_invis[id] = true;
    }
    else
    {
        fm_set_rendering(id);
        g_invis[id] = false;
    }
}

public remove_imobile(id)
{
    g_imobile[id] = false;

    set_speed(id);
}

public give_userweapon(id)
{
    if ( !get_pcvar_num(gPcvarBadgesActive) || !get_pcvar_num(gPcvarBadgePowers) ) return;
    if ( !is_user_alive(id) ) return;

    new bool:givenitem = false;

    new assaultlevel = g_PlayerBadges[id][BADGE_ASSAULT];
    if ( assaultlevel )
    {
        new hp;
        hp = 100 + (assaultlevel*10);

        set_user_health(id, hp);

        givenitem = true;
    }

    new sniperlevel = g_PlayerBadges[id][BADGE_SNIPER];
	moredmg[id] = false;
    if ( sniperlevel )
    {
        if ( random_num(1, (4-sniperlevel)) == 1 )
        {
            new weaponName[32];
            new weaponID = get_user_weapon(id);

            if ( !get_pcvar_num(gPcvarFreeAwp) )
            {
                moredmg[id] = true;
            }
            else
            {
                moredmg[id] = true;

            }

            if ( weaponID )
            {
                get_weaponname(weaponID, weaponName, charsmax(weaponName));
                engclient_cmd(id, weaponName);
            }

            givenitem = true;
        }
    }

	new CsArmorType:ArmorType;

	switch (numofbadges[id])
	{
		case 6 .. 11:
		{
			if ( cs_get_user_armor(id, ArmorType) < 50 )
			{
				cs_set_user_armor(id, 50, CS_ARMOR_VESTHELM);
				givenitem = true;
			}
		}

		case 13 .. 18:
		{
			if ( cs_get_user_armor(id, ArmorType) < 100 )
			{
				cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM);
				givenitem = true;
			}
		}
		
		case 19 .. 24:
		{
			if ( cs_get_user_armor(id, ArmorType) < 150 )
			{
				cs_set_user_armor(id, 150, CS_ARMOR_VESTHELM);
				givenitem = true;
			}
		}
		
		case 25 .. 29:
		{
			if ( cs_get_user_armor(id, ArmorType) < 200 )
			{
				cs_set_user_armor(id, 200, CS_ARMOR_VESTHELM);
				givenitem = true;
			}
		}

		case 30 .. 34:
		{
			cs_set_user_armor(id, 250, CS_ARMOR_VESTHELM);
			givenitem = true;
		}
	}

	if ( givenitem )
		screen_flash(id, 0, 255, 0, 100); //Green screen flash
}

DMG jest dziwny, walę czasami po 110 w klate lub 130.... Dodam jeszcze, że przed zmianą pluginu miałem wbitą odznakę ze snajperki.




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

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