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

COD_CLASS Help!New class plz

cod_class

  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
3 odpowiedzi w tym temacie

#1 bugg

    Życzliwy

  • Użytkownik

Reputacja: 0
Nowy

  • Postów:29
  • Lokalizacja:Spain
Offline

Napisano 25.04.2012 03:51

need help!!!

I need to create 2 new classes for codmod.

The first is simple:

/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <codmod>
#include <fakemeta>
new const nazwa[] = "Almirante (Admin Clase)";
new const opis[] = "Triple Jump";
new const bronie = 1<<CSW_FAMAS | 1<<CSW_DEAGLE | 1<<CSW_MP5NAVY;
new const zdrowie = 35;
new const kondycja = 20;
new const inteligencja = 20;
new const wytrzymalosc = 30;
new bool:ma_klase[33];
new bool:moze_skoczyc[33];
new const maxClip[31] = { -1, 13, -1, 10, 1, 7, 1, 30, 30, 1, 30, 20, 25, 30, 35, 25, 12, 20,
10, 30, 100, 8, 30, 30, 20, 2, 7, 30, 30, -1, 50 };
public plugin_init() {
register_plugin(nazwa, "1.0", "QTM_Peyote");

cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);

register_forward(FM_CmdStart, "CmdStart");
register_event("DeathMsg", "DeathMsg", "ade");
}
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_F))
{
client_print(id, print_chat, "[Almirante] Solo los admins pueden selecionar esta clase.")
return COD_STOP;
}
ma_klase[id] = true;
return COD_CONTINUE;
}
public cod_class_disabled(id)
ma_klase[id] = false;
public CmdStart(id, uc_handle)
{
if(!ma_klase[id])
return FMRES_IGNORED;

new button = get_uc(uc_handle, UC_Buttons);
new oldbutton = pev(id, pev_oldbuttons);
new flags = pev(id, pev_flags);
if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && moze_skoczyc[id])
{
moze_skoczyc[id] = false;
new Float:velocity[3];
pev(id, pev_velocity, velocity);
velocity[2] = random_float(265.0,285.0);
set_pev(id, pev_velocity, velocity);
}
else if(flags & FL_ONGROUND)
moze_skoczyc[id] = true;

return FMRES_IGNORED;
}
public DeathMsg()
{
new killer = read_data(1);
new victim = read_data(2);

if(!is_user_connected(killer))
return PLUGIN_CONTINUE;

if(ma_klase[victim] && !ma_klase[killer])
cod_set_user_xp(killer, cod_get_user_xp(killer)+10);

if(ma_klase[killer])
{
new cur_health = pev(killer, pev_health);
new Float:max_health = 100.0+cod_get_user_health(killer);
new Float:new_health = cur_health+20.0<max_health? cur_health+20.0: max_health;
set_pev(killer, pev_health, new_health);

new weapon = get_user_weapon(killer);
if(maxClip[weapon] != -1)
set_user_clip(killer, maxClip[weapon]);
}


return PLUGIN_CONTINUE;
}
stock set_user_clip(id, ammo)
{
new weaponname[32], weaponid = -1, weapon = get_user_weapon(id, _, _);
get_weaponname(weapon, weaponname, 31);
while ((weaponid = engfunc(EngFunc_FindEntityByString, weaponid, "classname", weaponname)) != 0)
if (pev(weaponid, pev_owner) == id) {
set_pdata_int(weaponid, 51, ammo, 4);
return weaponid;
}
return 0;
}


This class already exists, but only jump 2 times.
It is possible to jump 3 times?


and next classcod.

I would like to begin round, the class has the opportunity to start at the base of the enemy.


I saw this class created in this forum,but has a bug when it starts at the base of the enemy,the next round has the skin of the enemy.
I think you should only wear the skin of the enemy when it starts in the enemy base, but no tall rounds.
http://amxx.pl/topic...asa-terrorysta/

any1 can help me?

Thx.

Użytkownik bugg edytował ten post 25.04.2012 03:54

  • +
  • -
  • 0

#2 MarWit

    The Chosen One

  • Przyjaciel

Reputacja: 843
Czempion

  • Postów:1 485
  • GG:
  • Steam:steam
  • Imię:Marcin
  • Lokalizacja:Bystrzyca
Offline

Napisano 25.04.2012 09:25

Automatyczna wiadomość


Ten temat został przeniesiony z forum:
Scripting AMXX > Pluginy
do
AMX Mod X > Multilingual


  • +
  • -
  • 0

marwit-0.png


#3 sandking91

    Początkujący

  • Użytkownik

Reputacja: 2
Nowy

  • Postów:15
  • Lokalizacja:opole
Offline

Napisano 30.04.2012 16:07

#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <fakemeta>
	    
new const nazwa[]   = "Almirante (Admin Clase)";
new const opis[]    = "Triple Jump";
new const bronie    = (1<<CSW_FAMAS)|(1<<CSW_MP5NAVY)|(1<<CSW_DEAGLE);
new const zdrowie   = 35;
new const kondycja  = 20;
new const inteligencja = 20;
new const wytrzymalosc = 30;
    
new skoki[33];

new ma_klase[33];

public plugin_init()
{
    register_plugin(nazwa, "1.0", "amxx.pl");

    cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
   
    register_forward(FM_CmdStart, "fwCmdStart_MultiJump");

}

public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_F))
{
  client_print(id, print_chat, "[Almirante] Solo los admins pueden selecionar esta clase.")
  return COD_STOP;
}

ma_klase[id] = true;
return COD_CONTINUE;
}

public cod_class_disabled(id)
{
    ma_klase[id] = false;

}

public fwCmdStart_MultiJump(id, uc_handle)
{
    if(!is_user_alive(id) || !ma_klase[id])
        return FMRES_IGNORED;

    new flags = pev(id, pev_flags);

    if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id])
    {
        skoki[id]--;
        new Float:velocity[3];
        pev(id, pev_velocity,velocity);
        velocity[2] = random_float(265.0,285.0);
        set_pev(id, pev_velocity,velocity);
    }
    else if(flags & FL_ONGROUND)
        skoki[id] = 3;

    return FMRES_IGNORED;
}

Here u are :)
+ for it would be nice ;)
  • +
  • -
  • 0

#4 xPappy

    Nowy

  • Nowy

Reputacja: 0
Nowy

  • Postów:2
  • Steam:steam
  • Imię:Leonard
  • Lokalizacja:Granada, Spain
Offline

Napisano 17.07.2012 23:53

Thanks.
  • +
  • -
  • 0





Również z jednym lub większą ilością słów kluczowych: cod_class

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

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