[ROZWIĄZANE] Prośba o dodanie ogranicznika...
Najlepsza odpowiedź Cyb3rShot 14.07.2013 22:44
Zobacz to.
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <fakemeta>
new const nazwa[] = "Kapral";
new const opis[] = "Mniejszy rozrzut broni";
new const bronie = (1<<CSW_FAMAS)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_M4A1);
new const zdrowie = 10;
new const kondycja = 5;
new const inteligencja = 10;
new const wytrzymalosc = 5;
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");
register_forward(FM_CmdStart, "CmdStart");
}
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_chat, "[Kapral] 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;
}
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] = 1;
return FMRES_IGNORED;
}
public CmdStart(id, uc_handle)
Kisiel ;*
12.07.2013
Tak jak w temacie...
Klasa:
#include <amxmodx> #include <amxmisc> #include <codmod> #include <fakemeta> new const nazwa[] = "Kapral"; new const opis[] = "Mniejszy rozrzut broni"; new const bronie = (1<<CSW_FAMAS)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_M4A1); new const zdrowie = 10; new const kondycja = 5; new const inteligencja = 10; new const wytrzymalosc = 5; 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_H)) { client_print(id, print_chat, "[Kapral] 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; } 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] = 1; return FMRES_IGNORED; }
koong
12.07.2013
zobacz czy będzie działać.
#include <amxmodx> #include <amxmisc> #include <codmod> #include <fakemeta> new const nazwa[] = "Kapral"; new const opis[] = "Mniejszy rozrzut broni"; new const bronie = (1<<CSW_FAMAS)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_M4A1); new const zdrowie = 10; new const kondycja = 5; new const inteligencja = 10; new const wytrzymalosc = 5; 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"); register_forward(FM_UpdateClientData, "UpdateClientData", 1); } public UpdateClientData(id, sw, cd_handle) { if(ma_klase[id]) set_cd(cd_handle, CD_PunchAngle, {0.0,0.0,0.0}) } public cod_class_enabled(id) { if(!(get_user_flags(id) & ADMIN_LEVEL_H)) { client_print(id, print_chat, "[Kapral] 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; } 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] = 1; return FMRES_IGNORED; }
Najlepsza odpowiedź
Cyb3rShot
14.07.2013
Zobacz to.
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <fakemeta>
new const nazwa[] = "Kapral";
new const opis[] = "Mniejszy rozrzut broni";
new const bronie = (1<<CSW_FAMAS)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_M4A1);
new const zdrowie = 10;
new const kondycja = 5;
new const inteligencja = 10;
new const wytrzymalosc = 5;
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");
register_forward(FM_CmdStart, "CmdStart");
}
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_chat, "[Kapral] 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;
}
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] = 1;
return FMRES_IGNORED;
}
public CmdStart(id, uc_handle)