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
 

FireSort - zdjęcie

FireSort

Rejestracja: 03.02.2011
Aktualnie: Nieaktywny
Poza forum Ostatnio: 06.07.2012 19:11
-----

Moje tematy

Task w gunxpmod

13.02.2012 22:11

Witam mam pewien problem.

Mianowicie chodzi o to aby wpisując komendę /bron
register_clcmd("say /bron","show_main_menu_level");
Menu otwierało się z opóźnieniem 5 sekund. Tak jak jest tu.

public fwd_PlayerSpawn(id)
{
if( !get_pcvar_num(p_Enabled) || !is_user_alive(id) )
  return;

g_kills[id] = 0
 
#if defined ZOMBIE_SWARM
if ( !get_pcvar_num(level_style) && cs_get_user_team(id) == CS_TEAM_CT )
{
  StripPlayerWeapons(id);
  
  set_task(5.0, "show_main_menu_level", id)
}
#endif

Cod General

06.01.2012 14:16

Witam, bardzo bym prosił o dodanie do tego pluginu zmiany modeli AK47 i zwiększenia z niej obrazen o 30 procent i dodania 2 rakietek.

/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <codmod>
#include <colorchat>
#include <engine>
#define DMG_BULLET (1<<1)
new bool:ma_klase[33];
new const nazwa[] = "General";
new const opis[] = "Klasa premium, wybucha po smierci zadajac 90(+intelgencja) obrazen";
new const bronie = 1<<CSW_AK47 | 1<<CSW_HEGRENADE | 1<<CSW_FLASHBANG | 1<<CSW_SMOKEGRENADE;
new const zdrowie = 50;
new const kondycja = 4;
new const inteligencja = 6;
new const wytrzymalosc = 15;
new sprite_blast, sprite_white;
public plugin_init()
{
register_plugin(nazwa, "1.0", "QTM_Peyote");

cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_event("DeathMsg", "Death", "ade");
}
public plugin_precache()
{
sprite_white = precache_model("sprites/white.spr") ;
sprite_blast = precache_model("sprites/dexplo.spr");
}
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
  ColorChat(id, RED, "[General] Nie masz uprawnien, aby korzystac z tej klasy.");
  return COD_STOP;
}
ColorChat(id, GREEN, "Klasa stworzona przez pluginymody.webd.pl");
ma_klase[id] = true;
return COD_CONTINUE;
}

public cod_class_disabled(id)
ma_klase[id] = false;
public Death()
{
new id = read_data(2);
if(ma_klase[id])
  Eksploduj(id);
}
public Eksploduj(id)
{
new Float:fOrigin[3], iOrigin[3];
entity_get_vector( id, EV_VEC_origin, fOrigin);
iOrigin[0] = floatround(fOrigin[0]);
iOrigin[1] = floatround(fOrigin[1]);
iOrigin[2] = floatround(fOrigin[2]);

message_begin(MSG_BROADCAST,SVC_TEMPENTITY, iOrigin);
write_byte(TE_EXPLOSION);
write_coord(iOrigin[0]);
write_coord(iOrigin[1]);
write_coord(iOrigin[2]);
write_short(sprite_blast);
write_byte(32);
write_byte(20);
write_byte(0);
message_end();

message_begin( MSG_BROADCAST, SVC_TEMPENTITY, iOrigin );
write_byte( TE_BEAMCYLINDER );
write_coord( iOrigin[0] );
write_coord( iOrigin[1] );
write_coord( iOrigin[2] );
write_coord( iOrigin[0] );
write_coord( iOrigin[1] + 300 );
write_coord( iOrigin[2] + 300 );
write_short( sprite_white );
write_byte( 0 ); // startframe
write_byte( 0 ); // framerate
write_byte( 10 ); // life
write_byte( 10 ); // width
write_byte( 255 ); // noise
write_byte( 255 ); // r, g, b
write_byte( 100 );// r, g, b
write_byte( 100 ); // r, g, b
write_byte( 128 ); // brightness
write_byte( 8 ); // speed
message_end();

new entlist[33];
new numfound = find_sphere_class(id, "player", 300.0 , entlist, 32);

for (new i=0; i < numfound; i++)
{ 
  new pid = entlist[i];
 
  if (!is_user_alive(pid) || get_user_team(id) == get_user_team(pid))
   continue;
  cod_inflict_damage(id, pid, 90.0, 0.7);
}
return PLUGIN_CONTINUE;
}

[ROZWIĄZANE] Prośba o przerobienie pluginu

25.10.2011 20:13

Proszę o małe przerobienie pluginu który pokazuję ile osoba w którą uderzymy ma HP, chodzi mi o to aby po uderzeniu pokazywało też jej nick

#include <amxmodx>
public plugin_init() {
	    register_plugin("Damage Done", "1.0", "byCZEK");
	   
	    register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0");
}public on_damage(id)
{
	    new attacker = get_user_attacker(id);
	   
	    if(is_user_connected(attacker) && is_user_alive(id))
			    client_print(attacker, print_center, "HP: %d", get_user_health(id));   
}

Prośba o przerobienie pluginu

25.10.2011 14:06

Witam, bardzo prosił bym o przerobienie pluginu GunXpMod tak aby po wpisaniu /bron wyświetlało się menu z wyborem broni. Najlepiej było by aby nie można było użyć tej komendy kiedy ma się już jakąś bron. Ale zwykłe dodanie komendy też mi pasuje :)

[ROZWIĄZANE] Kompilacja

24.10.2011 13:13

Mam problem z kompilacją pluginu, próbowałem zarówno na lokalu jak i na internetowych kompilatorach

A o to kod.
#include <amxmodx>
#include <fakemeta>
new const FLARE_MODEL[] = "models/zombie_plague/v_grenade_flare.mdl";
//new const FLARE_SOUNDS[][] = { "zombie_plague/thunder1.wav", "zombie_plague/thunder2.wav" };
new pcvar_flare_duration;
public plugin_init()
{
	    register_plugin("Smoke Flares", "0.1", "Mini_Midget")
	   
	    pcvar_flare_duration = register_cvar("flare_duration", "60.0")
	   
	    register_forward(FM_SetModel, "fw_setmodel")   
	    register_forward(FM_Think, "fw_think");
}
public plugin_precache()
{
	    engfunc(EngFunc_PrecacheModel, FLARE_MODEL);
	    //for (new i = 0 ; i < sizeof FLARE_SOUNDS ; i++)
	    //	  engfunc(EngFunc_PrecacheSound, FLARE_SOUNDS[i]);
}
public fw_setmodel(ent, model[])
{
			    //Not a valid ent	 or	  Thrower not alive
	    if (!pev_valid(ent) || !is_user_alive(pev(ent, pev_owner))) // not a valid ent
			    return FMRES_IGNORED;
	   
	    new Float: duration = get_pcvar_float(pcvar_flare_duration)
			   
	    if (equali(model,"models/w_smokegrenade.mdl"))
	    {
			    new className[33]
			    pev(ent, pev_classname, className, 32)
			   
			    // Stop smoke grenade from exploding
			    set_pev(ent, pev_nextthink, get_gametime() + duration);
			    //Effects
			    set_pev(ent,pev_effects,EF_BRIGHTLIGHT);
			    fm_set_rendering(ent, kRenderFxGlowShell, 150, 150, 250, kRenderNormal, 16)
			    //Sound
			    //engfunc(EngFunc_EmitSound, ent, CHAN_AUTO, FLARE_SOUNDS[random(sizeof FLARE_SOUNDS)], VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
			   
			    if(equal(className, "weaponbox") || equal(className, "armoury_entity") || equal(className, "grenade"))
		    {
					    engfunc(EngFunc_SetModel, ent, FLARE_MODEL);
					    return FMRES_SUPERCEDE
			    }
	    }
			   
	    return FMRES_IGNORED;
}
public fw_think(ent)
{
			    //Not a valid ent	 or	  Thrower not alive
	    if (!pev_valid(ent) || !is_user_alive(pev(ent, pev_owner))) // not a valid ent
			    return FMRES_IGNORED;
			   
	    static classname[33]
	    pev(ent, pev_classname, classname, sizeof classname - 1);
	    static model[33]
	    pev(ent, pev_model, model, sizeof model - 1);
	   
	    if( equal(model, FLARE_MODEL) && equal(classname, "grenade"))
			    engfunc(EngFunc_RemoveEntity, ent);
			   
	    return FMRES_IGNORED;
}
stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16) {
	    new Float:RenderColor[3];
	    RenderColor[2] = float( B);
	    RenderColor[0] = float(r);
	    RenderColor[1] = float(g);
	    set_pev(entity, pev_renderfx, fx);
	    set_pev(entity, pev_rendercolor, RenderColor);
	    set_pev(entity, pev_rendermode, render);
	    set_pev(entity, pev_renderamt, float(amount));
	    return 1;
}

przy kompilacji wyskakuje
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
/tmp/textfuJnc0.sma(76) : error 017: undefined symbol "B"
/tmp/textfuJnc0.sma(86) : warning 203: symbol is never used: "b"
1 Error.
Could not locate output file /home/groups/amxmodx/public_html/websc3/textfuJnc0.amx (compile failed).