#include <amxmodx> #include <amxmisc> #include <codmod> #include <cstrike> #include <fun> #include <fakemeta> #include <engine> #define PLUGIN "Kameleon" #define VERSION "1.0" #define AUTHOR "CheQ" new const nazwa[] = "Marszalek"; new const opis[] = "Posiada M4A1 , AK47 , AWP , za kazdego fraga dostaje 35 hp"; new const bronie = 1<<CSW_M4A1 | 1<<CSW_AK47 | 1<<CSW_AWP | 1<<CSW_DEAGLE; new const zdrowie = 60; new const kondycja = 50; new const inteligencja = 0; new const wytrzymalosc = 20; new Ubrania_CT[4][]={"sas","gsg9","urban","gign"}; new Ubrania_Terro[4][]={"arctic","leet","guerilla","terror"}; new bool:ma_klase[33]; new ilosc_skokow_gracza[33]; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); register_event("CurWeapon","CurWeapon","be", "1=1"); register_event("DeathMsg", "Death", "ade"); register_forward(FM_CmdStart, "CmdStart"); } public CmdStart(id,uc_handle) { if(!is_user_alive(id)) return FMRES_IGNORED; new button = get_uc(uc_handle, UC_Buttons); new flags = get_entity_flags(id); new oldbutton = get_user_oldbutton(id); if(ma_klase[id]) { if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && ilosc_skokow_gracza[id] > 0) { ilosc_skokow_gracza[id]--; new Float:velocity[3]; entity_get_vector(id,EV_VEC_velocity,velocity); velocity[2] = random_float(265.0,285.0); entity_set_vector(id,EV_VEC_velocity,velocity); } else if(flags & FL_ONGROUND) { ilosc_skokow_gracza[id] = 0; if(ma_klase[id]) ilosc_skokow_gracza[id]++; } } return PLUGIN_CONTINUE; } public cod_class_enabled(id) { if(!get_user_flags(id) & ADMIN_LEVEL_D) { client_print(id, print_chat, "[Cod] Nie masz uprawnien do posiadania tej klasy"); return COD_STOP; } ma_klase[id] = true; return PLUGIN_CONTINUE; } public cod_class_disabled(id) ma_klase[id] = false; public CurWeapon(id) { new weapon = read_data(2); new num = random_num(0,3); if(ma_klase[id] && weapon == CSW_M4A1) { cs_set_user_model(id, Ubrania_CT[num]); } if(ma_klase[id] && weapon == CSW_AK47) { cs_set_user_model(id, Ubrania_Terro[num]); } } public Death() { new attacker = read_data(1); if(!is_user_connected(attacker)) return PLUGIN_CONTINUE; if(!ma_klase[attacker]) return PLUGIN_CONTINUE; new cur_health = get_user_health(attacker); new max_health = 100+cod_get_user_health(attacker); new new_health = cur_health+35<max_health? cur_health+35: max_health; set_user_health(attacker, new_health); return PLUGIN_CONTINUE; }
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.
|

Prosze o naprawe klasy premium.
#1
Napisano 09.04.2012 19:14
#2
Napisano 09.04.2012 19:51
if(!get_user_flags(id) & ADMIN_LEVEL_D)
na
if(!get_user_flags(id) & ADMIN_LEVEL_D))
Aktualny projekt: Dokumentacja Offline || [ 10% ]
#3
Napisano 09.04.2012 19:58
#4
Napisano 09.04.2012 20:05
if(!get_user_flags(id) & ADMIN_LEVEL_D))
jak tak zrobisz to nie skompilujesz sma...
ADMIN_LEVEL_D to jest flaga "p" chyba wiesz o tym
#5
Napisano 09.04.2012 20:06
#6
Napisano 09.04.2012 20:11
#7
Napisano 09.04.2012 20:13
#8
Napisano 09.04.2012 20:16
#9
Napisano 09.04.2012 20:31
proszę o podanie gotowego pliku
#10
Napisano 09.04.2012 20:48
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <cstrike>
#include <fun>
#include <fakemeta>
#include <engine>
#define PLUGIN "Kameleon"
#define VERSION "1.0"
#define AUTHOR "CheQ"
new const nazwa[] = "Marszalek";
new const opis[] = "Posiada M4A1 , AK47 , AWP , za kazdego fraga dostaje 35 hp";
new const bronie = 1<<CSW_M4A1 | 1<<CSW_AK47 | 1<<CSW_AWP | 1<<CSW_DEAGLE;
new const zdrowie = 60;
new const kondycja = 50;
new const inteligencja = 0;
new const wytrzymalosc = 20;
new Ubrania_CT[4][]={"sas","gsg9","urban","gign"};
new Ubrania_Terro[4][]={"arctic","leet","guerilla","terror"};
new bool:ma_klase[33];
new ilosc_skokow_gracza[33];
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_event("CurWeapon","CurWeapon","be", "1=1");
register_event("DeathMsg", "Death", "ade");
register_forward(FM_CmdStart, "CmdStart");
}
public CmdStart(id,uc_handle)
{
if(!is_user_alive(id))
return FMRES_IGNORED;
new button = get_uc(uc_handle, UC_Buttons);
new flags = get_entity_flags(id);
new oldbutton = get_user_oldbutton(id);
if(ma_klase[id])
{
if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && ilosc_skokow_gracza[id] > 0)
{
ilosc_skokow_gracza[id]--;
new Float:velocity[3];
entity_get_vector(id,EV_VEC_velocity,velocity);
velocity[2] = random_float(265.0,285.0);
entity_set_vector(id,EV_VEC_velocity,velocity);
}
else if(flags & FL_ONGROUND)
{
ilosc_skokow_gracza[id] = 0;
if(ma_klase[id])
ilosc_skokow_gracza[id]++;
}
}
return PLUGIN_CONTINUE;
}
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_D))
{
client_print(id, print_chat, "[Cod] Nie masz uprawnien do posiadania tej klasy");
return COD_STOP;
}
ma_klase[id] = true;
return PLUGIN_CONTINUE;
}
public cod_class_disabled(id)
ma_klase[id] = false;
public CurWeapon(id)
{
new weapon = read_data(2);
new num = random_num(0,3);
if(ma_klase[id] && weapon == CSW_M4A1)
{
cs_set_user_model(id, Ubrania_CT[num]);
}
if(ma_klase[id] && weapon == CSW_AK47)
{
cs_set_user_model(id, Ubrania_Terro[num]);
}
}
public Death()
{
new attacker = read_data(1);
if(!is_user_connected(attacker))
return PLUGIN_CONTINUE;
if(!ma_klase[attacker])
return PLUGIN_CONTINUE;
new cur_health = get_user_health(attacker);
new max_health = 100+cod_get_user_health(attacker);
new new_health = cur_health+35<max_health? cur_health+35: max_health;
set_user_health(attacker, new_health);
return PLUGIN_CONTINUE;
}
Sprawdz
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych