Mam problem z ninja, nie ma podwojnego skoku i nie przywraca mu sie hp oraz jest widoczny na kosie;/
proszę o pomoc.
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fun>
#include <codmod>
#include <colorchat>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#define TASK_WYSZKOLENIE_SANITARNE 736
new bool:moze_skoczyc[33];
new bool:ma_klase[33];
new const nazwa[] = "Ninja";
new const opis[] = "Jest malo widoczny na nozu, podwojny skok, zmiejszona grawitacja i co 5 sek dostaje 10hp";
new const bronie = 1<<CSW_AUG;
new const zdrowie = 40;
new const kondycja = 40;
new const inteligencja = 20;
new const wytrzymalosc = 20;
public plugin_init()
{
register_plugin(nazwa, "1.0", "QTM_Peyote")
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_event("CurWeapon","CurWeapon","be", "1=1");
register_event("ResetHUD", "ResetHUD", "abe");
register_forward(FM_CmdStart, "CmdStart");
}
public cod_klase_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_D))
{
client_print(id, print_chat, "[Ninja] Nie masz uprawnien, aby uzywac tej klasy.")
return COD_STOP;
}
ColorChat(id, GREEN, "Klasa %s zostala stworzona przez www.KaraTornia.pl", nazwa);
set_user_gravity(id, 700.0/800.0);
set_task(5.0, "WyszkolenieSanitarne", id+TASK_WYSZKOLENIE_SANITARNE);
ma_klase[id] = true;
}
public cod_klase_disabled(id)
{
ma_klase[id] = false;
set_rendering(id,kRenderFxGlowShell,0,0,0 ,kRenderTransAlpha, 255);
set_user_gravity(id, 800.0/800.0);
}
public CurWeapon(id)
{
if(!ma_klase[id])
return PLUGIN_CONTINUE;
if(get_user_weapon(id) == CSW_KNIFE)
set_rendering(id,kRenderFxGlowShell,0,0,0 ,kRenderTransAlpha, 40);
else
set_rendering(id,kRenderFxGlowShell,0,0,0 ,kRenderTransAlpha, 255);
}
public ResetHUD(id)
{
if(ma_klase[id])
set_user_gravity(id, 700.0/800.0);
}
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 WyszkolenieSanitarne(id)
{
id -= TASK_WYSZKOLENIE_SANITARNE;
if(!is_user_connected(id))
return PLUGIN_CONTINUE;
if(ma_klase[id])
{
set_task(5.0, "WyszkolenieSanitarne", id+TASK_WYSZKOLENIE_SANITARNE);
if(is_user_alive(id))
{
new cur_health = get_user_health(id);
new max_health = 100+cod_get_user_health(id);
new new_health = cur_health+10<max_health? cur_health+10: max_health;
set_user_health(id, new_health);
}
}
return PLUGIN_CONTINUE;
}Dodano 17 marzec 2011 - 20:25:
i jeszcze nie jest premium KURR...
Dodano 18 marzec 2011 - 14:17:
pomoze ktos?


Dodatki SourceMod



Temat jest zamknięty






