←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

Nowy CodMod - Klasa Premium- Niewidzialna

Zablokowany

  • +
  • -
XamaDishi - zdjęcie XamaDishi 30.06.2011

Witam. Mam problem ze zrobieniem Klasy "Cichy Zabojca". Chcialbym alby ona byla Premium, Miala AWP,DGLa,Wszystkie granaty i ...(Tu sie zatrzymam. Nie moge zrobic zeby byla niewidzialna :( Aktualnie klasa wyglada tak :

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <codmod>
#include <engine>

new const nazwa[] = "Cichy Zabojca";
new const opis[] = "Ledwo go widac,Ma Awke,dgla,paczke szyszek";
new const bronie = 1<<CSW_AWP | 1<<CSW_DEAGLE | 1<<CSW_HEGRENADE | 1<<CSW_FLASHBANG | 1<<CSW_SMOKEGRENADE;
new const zdrowie = -50;
new const kondycja = 100;
new const inteligencja = 500;
new const wytrzymalosc = 0;

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)
{
ma_klase[id] = true; **
set_rendering(id,kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 20);

if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_chat, "[Cichy Zabojca] Nie masz uprawnien, aby uzywac tej klasy.")
return COD_STOP;
}
ma_klase[id] = true;
return COD_CONTINUE;
}

public cod_class_disabled(id)
{
ma_klase[id] = false; **
set_rendering(id,kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255); 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;
}




proszę o pomoc.
Odpowiedz

  • +
  • -
Goliath - zdjęcie Goliath 30.06.2011

#include <amxmodx>
#include <codmod>
#include <fakemeta_util>

new const nazwa[] = "Cichy Zabojca";
new const opis[] = "Ledwo go widac,Ma Awke,dgla,paczke szyszek";
new const bronie = 1<<CSW_AWP | 1<<CSW_DEAGLE | 1<<CSW_HEGRENADE | 1<<CSW_FLASHBANG | 1<<CSW_SMOKEGRENADE;
new const zdrowie = -50;
new const kondycja = 100;
new const inteligencja = 500;
new const wytrzymalosc = 0;

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)
{
ma_klase[id] = true;

if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_chat, "[Cichy Zabojca] Nie masz uprawnien, aby uzywac tej klasy.")
return COD_STOP;
}
fm_set_rendering(id,kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 20);
ma_klase[id] = true;
return COD_CONTINUE;
}

public cod_class_disabled(id)
{
ma_klase[id] = false;
fm_set_rendering(id,kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255);
}

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;
}
Odpowiedz

  • +
  • -
XamaDishi - zdjęcie XamaDishi 30.06.2011

dzięki, ale... kompiluje pliki i wyskakuje error :

//AMXXPC compile.exe
// by the AMX Mod X Dev Team


/// codclass_cichyzabojca.sma
// C:\Documents and Settings\.......\pulpit\compiler\codclass_cichyzabojca.sma<110> : error 001 : epeceted token : "}", but found "-end of file-"
ITD

Dodano 30 czerwiec 2011 - 15:59:
Juz wykombinowalem ... Masz + I jeszcze raz dzięki ;)

Dodano 30 czerwiec 2011 - 17:12:
A jeszcze 1 pytanie do ciebie : Jak zrobic klase(Nie premium) np : Kucacz, jak kucnie z dowolną bronia to jest nie widzialny?
Jesli moglbys zrobic to :
Nazwa Kucacz
Opis : Ma Dgla i jest niewidzialny jak kucnie,

Z gory dzięki :>
Odpowiedz

  • +
  • -
sharkowy - zdjęcie sharkowy 30.06.2011

Klasa niewidzialna przy kucaniu:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <codmod>
#include <engine>
#include <colorchat>

#define DMG_BULLET (1<<1)


new bool:ma_klase[33];

new const nazwa[] = "Kucacz";
new const opis[] = "Podczas kucania jest niewidzialny";
new const bronie = 1<<CSW_DEAGLE;
new const zdrowie = 40;
new const kondycja = 45;
new const inteligencja = 0;
new const wytrzymalosc = 0;

public plugin_init()
{
register_plugin(nazwa, "1.0", "QTM_Peyote");

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

public cod_class_enabled(id)
{
ma_klase[id] = true;
}

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

public client_PreThink(id)
{
if(!ma_klase[id])
return;

new button = get_user_button(id);
if(button & IN_DUCK)
set_rendering(id,kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 5);
else
set_rendering(id,kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255);
}

Użytkownik RPK. Shark edytował ten post 30.06.2011 17:22
Odpowiedz

  • +
  • -
XamaDishi - zdjęcie XamaDishi 30.06.2011

Ogromne dzięki masz + :)
Użytkownik XamaDishi edytował ten post 01.07.2011 20:58
Odpowiedz

Hajtowy - zdjęcie Hajtowy 10.07.2011

Możecie tę klasę dać w .sma i .amxx ? Bo chciałbym na swojego wgrać :)
Odpowiedz

  • +
  • -
BliBs_Pl - zdjęcie BliBs_Pl 10.07.2011

Masz na pluginymody.webd.pl kucacza zwykłego i premium i to będzie to samo.
Odpowiedz
Zablokowany