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
 

MegatrOn - zdjęcie

MegatrOn

Rejestracja: 04.11.2011
Aktualnie: Nieaktywny
Poza forum Ostatnio: 11.06.2016 18:56
-----

#726802 Szukam pluginu wymuszenie CT

Napisane przez Robiin w 01.06.2016 01:10

Plugin który podałeś działa tak jak myslałem. Mianowicie wymusza bycie w CT dla wszystkich ale tylko w pierwszej rundzie. Potem w kolejnych już nie.

 

 

 

#include <amxmodx>

#include <cstrike>
public plugin_init() {
register_plugin("wymuszanie druzyn", "1.0", "fresh")
register_logevent("Koniec_Rundy", 2, "1=Round_End")
}
public Koniec_Rundy()
{
for(new id=1;id<=get_maxplayers();id++)
if(is_user_connected(id) && !is_user_hltv(id))
{
cs_set_user_team(id,CS_TEAM_CT)
}
}

 

 

 

 

Wystarczy użyć eventu nowej rundy, prawda?

#include <amxmodx>
#include <cstrike>

public plugin_init() {
	register_plugin("wymuszanie druzyn", "1.0", "fresh")
	register_logevent("Koniec_Rundy", 2, "1=Round_End")
	register_event("HLTV", "Nowa_Runda", "a", "1=0", "2=0")
}

public Koniec_Rundy()
{
	for(new id=1;id<=get_maxplayers();id++)
	if(is_user_connected(id) && !is_user_hltv(id))
	{
		cs_set_user_team(id,CS_TEAM_CT)
	}
}

public Nowa_Runda()
{
	for(new id=1;id<=get_maxplayers();id++)
	if(is_user_connected(id) && !is_user_hltv(id))
	{
		cs_set_user_team(id,CS_TEAM_CT)
	}
}

  • +
  • -
  • 1


#673597 Prośba o ustawienia limitu kupowania.

Napisane przez ^Szeregowy^ w 04.12.2014 18:04

Masz kompiluj lokalnie 

Załączone pliki




#673541 Prośba o ustawienia limitu kupowania.

Napisane przez ^Szeregowy^ w 04.12.2014 16:03

 

/* Plugin generated by AMXX-Studio */
 
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <zombieplague>
#include <hamsandwich>
#include <fakemeta_util>
#include <fun>
#include <engine>
 
#define PLUGIN "Nowy Plugin"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
 
//2 NOWE
#define USES_PER_ROUND 1
new giUses[33];
 
new const NADE_TYPE_KILLBOMB = 7000
new const Float:RADIUS = 240.0
new const sprite_grenade_trail[] = "sprites/laserbeam.spr"
new const sprite_grenade_ring[] = "sprites/shockwave.spr"
new const item_cost = 25
new const item_name[] = "Bomba Na Zombie"
new const model_grenade_infect[] = "models/zombie_plague/v_grenade_infect.mdl"
 
new item_id
new has_bomb[33]
new cvar_enabled, cvar_fragsinfect, cvar_ammoinfect, cvar_humanbonushp, cvar_flaregrenades
new g_trailSpr, g_exploSpr, g_msgScoreInfo, g_msgDeathMsg, g_msgScoreAttrib
 
public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    RegisterHam(Ham_Think, "grenade", "fw_ThinkGrenade")
    RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
    
    register_forward(FM_SetModel, "fw_SetModel")    
    
    register_message(get_user_msgid("CurWeapon"), "message_cur_weapon")
    
    cvar_enabled = register_cvar("zp_kill_bomb","1")
    cvar_fragsinfect = get_cvar_pointer("zp_zombie_frags_for_infect")
    cvar_ammoinfect = get_cvar_pointer("zp_zombie_infect_reward")
    cvar_humanbonushp = register_cvar("zp_kill_bomb_extra_hp","10")    
    cvar_flaregrenades = get_cvar_pointer("zp_flare_grenades")
    
    g_msgScoreInfo = get_user_msgid("ScoreInfo")
    g_msgDeathMsg = get_user_msgid("DeathMsg")
    g_msgScoreAttrib = get_user_msgid("ScoreAttrib")
    register_event("HLTV", "eventNewRound", "a", "1=0", "2=0");//NOWA
}
 
public plugin_precache()
{
    g_trailSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_trail)
    g_exploSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_ring)
    
    engfunc(EngFunc_PrecacheModel, model_grenade_infect)
    
    item_id = zp_register_extra_item(item_name,item_cost,ZP_TEAM_HUMAN)
}
 
public client_putinserver(id){
giUses[id] = 0;//NOWA
}
 
//NOWA FUNKCJA
public eventNewRound(){
for(new i=1;i<33;i++)
giUses[i] = 0;
}
 
 
public client_disconnect(id)
{
    has_bomb[id] = 0
}
 
public zp_extra_item_selected(player, itemid)
{
if(giUses[player] >= USES_PER_ROUND){//NOWA
client_print(player, print_chat, "* W tej rundzie juz nie mozesz uzyc tej komendy");//NOWA
return PLUGIN_HANDLED;//NOWA
}
giUses[player]++;//NOWA
    if(itemid == item_id)
    {
   
        has_bomb[player] = 1    
        fm_strip_user_gun(player,9)
        fm_give_item(player,"weapon_smokegrenade")
    }
    
}
 
public fw_PlayerKilled(victim, attacker, shouldgib)
{
    has_bomb[victim] = 0    
}
 
public fw_ThinkGrenade(entity)
{    
    if(!pev_valid(entity))
        return HAM_IGNORED
        
    static Float:dmgtime    
    pev(entity, pev_dmgtime, dmgtime)
    
    if (dmgtime > get_gametime())
        return HAM_IGNORED    
    
    if(pev(entity, pev_flTimeStepSound) == NADE_TYPE_KILLBOMB)
        kill_explode(entity)
    
    return HAM_SUPERCEDE
}
 
public fw_SetModel(entity, const model[])
{
    if(!get_pcvar_num(cvar_enabled))
        return    
    
    static Float:dmgtime
    pev(entity, pev_dmgtime, dmgtime)
    
    if (dmgtime == 0.0)
        return
    
    if (equal(model[7], "w_sm", 4))
    {        
        new owner = pev(entity, pev_owner)        
        
        if(!zp_get_user_zombie(owner) && has_bomb[owner])
        {
            set_pcvar_num(cvar_flaregrenades,0)            
            
            fm_set_rendering(entity, kRenderFxGlowShell, 255, 128, 0, kRenderNormal, 16)
            
            message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
            write_byte(TE_BEAMFOLLOW) // TE id
            write_short(entity) // entity
            write_short(g_trailSpr) // sprite
            write_byte(10) // life
            write_byte(10) // width
            write_byte(255) // r
            write_byte(128) // g
            write_byte(0) // b
            write_byte(200) // brightness
            message_end()
            
            set_pev(entity, pev_flTimeStepSound, NADE_TYPE_KILLBOMB)
        }
    }
    
}
 
 
public kill_explode(ent)
{
    if (!zp_has_round_started()) return
    
    set_pcvar_num(cvar_flaregrenades,1)
    
    static Float:originF[3]
    pev(ent, pev_origin, originF)
    
    create_blast(originF)    
    
    //engfunc(EngFunc_EmitSound, ent, CHAN_WEAPON, grenade_infect[random_num(0, sizeof grenade_infect - 1)], 1.0, ATTN_NORM, 0, PITCH_NORM)
    
    static attacker
    attacker = pev(ent, pev_owner)
    
    has_bomb[attacker] = 0
    
    static victim
    victim = -1
    while ((victim = engfunc(EngFunc_FindEntityInSphere, victim, originF, RADIUS)) != 0)
    {
        if (!is_user_alive(victim) || !zp_get_user_zombie(victim) || zp_get_user_nemesis(victim))
            continue
        
        SendDeathMsg(attacker, victim)
        FixDeadAttrib(victim)
        UpdateFrags(attacker, victim, get_pcvar_num(cvar_fragsinfect), 1, 1)
        user_kill(victim, 0)
        zp_set_user_ammo_packs(attacker,zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_ammoinfect))
        fm_set_user_health(attacker, pev(attacker, pev_health)+get_pcvar_num(cvar_humanbonushp))
        
    }
    
    engfunc(EngFunc_RemoveEntity, ent)
}
 
public create_blast(const Float:originF[3])
{
    engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
    write_byte(TE_BEAMCYLINDER) // TE id
    engfunc(EngFunc_WriteCoord, originF[0]) // x
    engfunc(EngFunc_WriteCoord, originF[1]) // y
    engfunc(EngFunc_WriteCoord, originF[2]) // z
    engfunc(EngFunc_WriteCoord, originF[0]) // x axis
    engfunc(EngFunc_WriteCoord, originF[1]) // y axis
    engfunc(EngFunc_WriteCoord, originF[2]+385.0) // z axis
    write_short(g_exploSpr) // sprite
    write_byte(0) // startframe
    write_byte(0) // framerate
    write_byte(4) // life
    write_byte(60) // width
    write_byte(0) // noise
    write_byte(255) // red
    write_byte(128) // green
    write_byte(0) // blue
    write_byte(200) // brightness
    write_byte(0) // speed
    message_end()
    
    engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
    write_byte(TE_BEAMCYLINDER) // TE id
    engfunc(EngFunc_WriteCoord, originF[0]) // x
    engfunc(EngFunc_WriteCoord, originF[1]) // y
    engfunc(EngFunc_WriteCoord, originF[2]) // z
    engfunc(EngFunc_WriteCoord, originF[0]) // x axis
    engfunc(EngFunc_WriteCoord, originF[1]) // y axis
    engfunc(EngFunc_WriteCoord, originF[2]+470.0) // z axis
    write_short(g_exploSpr) // sprite
    write_byte(0) // startframe
    write_byte(0) // framerate
    write_byte(4) // life
    write_byte(60) // width
    write_byte(0) // noise
    write_byte(255) // red
    write_byte(164) // green
    write_byte(0) // blue
    write_byte(200) // brightness
    write_byte(0) // speed
    message_end()
    
    engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
    write_byte(TE_BEAMCYLINDER) // TE id
    engfunc(EngFunc_WriteCoord, originF[0]) // x
    engfunc(EngFunc_WriteCoord, originF[1]) // y
    engfunc(EngFunc_WriteCoord, originF[2]) // z
    engfunc(EngFunc_WriteCoord, originF[0]) // x axis
    engfunc(EngFunc_WriteCoord, originF[1]) // y axis
    engfunc(EngFunc_WriteCoord, originF[2]+555.0) // z axis
    write_short(g_exploSpr) // sprite
    write_byte(0) // startframe
    write_byte(0) // framerate
    write_byte(4) // life
    write_byte(60) // width
    write_byte(0) // noise
    write_byte(255) // red
    write_byte(200) // green
    write_byte(0) // blue
    write_byte(200) // brightness
    write_byte(0) // speed
    message_end()
}
 
public UpdateFrags(attacker, victim, frags, deaths, scoreboard)
{
    set_pev(attacker, pev_frags, float(pev(attacker, pev_frags) + frags))
    
    fm_set_user_deaths(victim, fm_get_user_deaths(victim) + deaths)
    
    if (scoreboard)
    {    
        message_begin(MSG_BROADCAST, g_msgScoreInfo)
        write_byte(attacker) // id
        write_short(pev(attacker, pev_frags)) // frags
        write_short(fm_get_user_deaths(attacker)) // deaths
        write_short(0) // class?
        write_short(fm_get_user_team(attacker)) // team
        message_end()
        
        message_begin(MSG_BROADCAST, g_msgScoreInfo)
        write_byte(victim) // id
        write_short(pev(victim, pev_frags)) // frags
        write_short(fm_get_user_deaths(victim)) // deaths
        write_short(0) // class?
        write_short(fm_get_user_team(victim)) // team
        message_end()
    }
}
 
stock fm_set_user_deaths(id, value)
{
    set_pdata_int(id, 444, value, 5)
}
 
stock fm_get_user_deaths(id)
{
    return get_pdata_int(id, 444, 5)
}
 
 
stock fm_get_user_team(id)
{
    return get_pdata_int(id, 114, 5)
}
 
public SendDeathMsg(attacker, victim)
{
    message_begin(MSG_BROADCAST, g_msgDeathMsg)
    write_byte(attacker) // killer
    write_byte(victim) // victim
    write_byte(1) // headshot flag
    write_string("grenade") // killer's weapon
    message_end()
}
 
public FixDeadAttrib(id)
{
    message_begin(MSG_BROADCAST, g_msgScoreAttrib)
    write_byte(id) // id
    write_byte(0) // attrib
    message_end()
}
 
public replace_models(id)
{
    if (!is_user_alive(id))
        return
    
    if(get_user_weapon(id) == CSW_SMOKEGRENADE && has_bomb[id])
    {
        set_pev(id, pev_viewmodel2, model_grenade_infect)
        
    }
}
 
public message_cur_weapon(msg_id, msg_dest, msg_entity)
{
    replace_models(msg_entity)
}
 



#663883 Problem z opisami do extra items. ZP 4.3

Napisane przez MAGNET w 15.09.2014 12:07

%L zmieniasz na swój text w sma.

Masz wgrane pliki Lang i masz język polski w amx_langmenu?
  • +
  • -
  • 1


#663887 Problem z opisami do extra items. ZP 4.3

Napisane przez Drago36 w 15.09.2014 13:10

No właśnie, bo posiadasz zmodyfikowaną wersję. W itemach z tego forum nie posiadają opisów, trzeba je przerobić.

Podeślij link do paczki, tej co pobierałeś.


  • +
  • -
  • 1


#661870 Problem z extraitem zatrute m3

Napisane przez MAGNET w 02.09.2014 19:19

Pliczki txt wpakuj do addons/amxmodx/data/Lang. Jeśli masz tak dalej to najprawdopodobniej musisz zmienić sobie język w amx_langmenu
  • +
  • -
  • 1


#318267 Potrzebuję pluginu blokującego pake

Napisane przez Bad Day w 05.11.2011 18:02

W Cvar'ach się to ustawia.
Objective Cvars
	 gg_block_objectives (default: 0)
		 Removes objectives on bomb and hostage maps (no VIP support for GunGame).
	 gg_bomb_defuse_lvl (default: 1)
		 Gives players a level when they plant or defuse the bomb. If set to 2, Terrorists only gain a level if they plant the bomb and it explodes, whereas if set to 1, they only need to plant it to gain a level.
	 gg_host_touch_reward (default: 2)
		 Players gain one score (not level) if they touch this many unique hostages in the same round. A value of 0 disables this feature.
	 gg_host_rescue_reward (default: 2)
		 Players gain one level if they rescue this many unique hostages in the same round. A value of 0 disables this feature.
	 gg_host_kill_reward (default: 1)
		 How much EXTRA score (not level) a Terrorist gets for killing a CT that was escorting a hostage. Players can't go up more than one extra level by this. A value of 0 disables this feature. DOES NOT WORK IN CONDITION ZERO!
	 gg_host_kill_penalty (default: 1)
		 How much score (not level) a player loses for killing a hostage.

  • +
  • -
  • 1