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

Prośba o przerobienie "Rocketman"Chodzi o usunięcie premium


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

#1 JanDzban

    Życzliwy

  • Zbanowany

Reputacja: 3
Nowy

  • Postów:25
  • Imię:Jan
  • Lokalizacja:GRodz
Offline

Napisano 17.02.2012 18:33

Witam; ) Mógł by mi ktoś usunąć premium z klasy "Rocketman" i zmienić ak47 na famsa ?będe wdzięczny ; D sma klasy :

#include <amxmodx>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <codmod>
/*****KONFIGURACJA*****/
#define COLORCHAT
#define PREMIUM
#define PREDKOSC 500
#define MAX_PALIWO 50
#define WSPOLCZYNNIK_PALIWA 0.1
#define CO_ILE_TANKOWANIE 0.3
#define CO_ILE_SPALANIE 0.1
/*****KONFIGURACJA*****/
/*#define TASK_SPALANIE 666
#define TASK_TANKOWANIE 999*/
#if defined COLORCHAT
#include <colorchat>
#endif
new const PLUGIN[] = "Jetpack Lite";
new const VERSION[] = "1.0";
new const AUTHOR[] = "v3x & kisiel96";
new smoke;
new bool:has_jp[33];
new bool:has_started;
new frame[33];
new paliwo[33];
new max_paliwo[33];
new bool:ma_klase[33];
new const nazwa[] = "[P] Rocketman";
new const opis[] = "Ma Jetpack (plecak odrzutowy)";
new const bronie = 1<<CSW_AK47 | 1<<CSW_DEAGLE;
new const zdrowie = 20;
new const kondycja = -30;
new const inteligencja = 0;
new const wytrzymalosc = 20;
public plugin_init()
{
register_plugin(PLUGIN , VERSION , AUTHOR);

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

register_event("DeathMsg" , "Event_DeathMsg" , "a");
register_event("HLTV" , "did_not_start" , "a" , "1=0" , "2=0");

register_logevent("did_start" , 2 , "1=Round_Start");

register_event("ResetHUD", "ResetHUD", "abe");
register_event("CurWeapon","CurWeapon","be", "1=1")
register_forward(FM_PlayerPreThink, "PlayerPreThink")
register_forward(FM_UpdateClientData, "UpdateClientData_Post", 1)
register_forward(FM_CmdStart,"fwd_CmdStart")
}
public plugin_natives()
{
register_native("cod_get_user_class_fuel", "PobierzIlosc", 1);
register_native("cod_get_user_class_max_fuel", "PobierzIloscMax", 1);
}
public plugin_precache()
{
smoke = precache_model("sprites/lightsmoke.spr");
precache_model("models/p_egon.mdl")
precache_model("models/v_egon.mdl")
precache_sound("QTM_CodMod/jetpack.wav");
}
public cod_class_enabled(id)
{
#if defined PREMIUM
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
#if defined COLORCHAT
ColorChat(id, GREEN, "[Rocketman] Nie masz uprawnien, aby uzywac tej klasy.")
#endif
#if !defined COLORCHAT
client_print(id, print_chat, "[Rocketman] Nie masz uprawnien, aby uzywac tej klasy.")
#endif
return COD_STOP;
}
#endif
ma_klase[id] = true;
paliwo[id] = MAX_PALIWO+floatround((cod_get_user_intelligence(id, 1, 1, 1)*WSPOLCZYNNIK_PALIWA), floatround_round);
max_paliwo[id] = MAX_PALIWO+floatround((cod_get_user_intelligence(id, 1, 1, 1)*WSPOLCZYNNIK_PALIWA), floatround_round);
#if defined COLORCHAT
ColorChat(id, GREEN, "[Rocketman] Klasa stworzona przez kisiel96.");
#endif
#if !defined COLORCHAT
client_print(id, print_chat, "[Rocketman] Klasa stworzona przez kisiel96.");
#endif

#if defined PREMIUM
return COD_CONTINUE;
#endif
}
public cod_class_disabled(id)
{
ma_klase[id] = false;
has_jp[id] = false;
}
public cod_class_skill_used(id)
{
if(has_jp[id])
{
JetPackOff(id)
}
else
{
JetPackOn(id)
}
}
public ResetHUD(id)
paliwo[id] = MAX_PALIWO+floatround((cod_get_user_intelligence(id, 1, 1, 1)*WSPOLCZYNNIK_PALIWA), floatround_round);
public PlayerPreThink(id)
{
if(!is_user_connected(id) || !is_user_alive(id))
{
return FMRES_IGNORED;
}
if(!ma_klase[id])
{
return FMRES_IGNORED;
}
if(!has_jp[id])
{
SprawdzTankowanie(id)
return FMRES_IGNORED;
}
if(!has_started)
{
return FMRES_IGNORED;
}
else
{
SprawdzTankowanie(id)
}

set_pev(id, pev_button, pev(id,pev_button) & ~IN_ATTACK);

if(get_user_button(id) & IN_JUMP)
{
if(paliwo[id] > 0)
{
new Float:fAim[3] , Float:fVelocity[3];
VelocityByAim(id , PREDKOSC, fAim);

fVelocity[0] = fAim[0];
fVelocity[1] = fAim[1];
fVelocity[2] = fAim[2];

set_user_velocity(id , fVelocity);

entity_set_int(id , EV_INT_gaitsequence , 6);

emit_sound(id , CHAN_VOICE , "QTM_CodMod/jetpack.wav" , 1.0 , ATTN_NORM , 0 , PITCH_NORM);

if(frame[id] >= 3)
{
frame[id] = 0;
smoke_effect(id);
entity_set_string(id , EV_SZ_weaponmodel , "models/p_egon.mdl");
}
frame[id]++;

SprawdzSpalanie(id)


}
else
{
client_print(id, print_center, "Skonczylo Ci sie paliwo! Automatycznie zdjales Jetpack!");
has_jp[id] = false;

SprawdzTankowanie(id)
}
}
else
{
SprawdzTankowanie(id)
}
return FMRES_IGNORED;
}
public UpdateClientData_Post(id, sendweapons, cd_handle)
{
if(!is_user_connected(id))
{
return FMRES_IGNORED;
}
if(!is_user_alive(id))
{
return FMRES_IGNORED;
}
if(!ma_klase[id])
{
return FMRES_IGNORED;
}
if(has_jp[id])
{
set_cd(cd_handle, CD_flNextAttack, halflife_time() + 0.001 );
}

return FMRES_HANDLED;
}
public fwd_CmdStart(id, uc_handle, seed)
{
if(!is_user_connected(id))
{
return FMRES_IGNORED;
}
if(!is_user_alive(id))
{
return FMRES_IGNORED;
}
if(!ma_klase[id])
{
return FMRES_IGNORED;
}

new buttons = get_uc(uc_handle, UC_Buttons)
new oldbuttons = get_user_oldbutton(id);

if((buttons & IN_ATTACK) || !(oldbuttons & IN_ATTACK))
{
return FMRES_IGNORED;
}
if(has_jp[id])
{
set_uc(uc_handle, UC_Buttons, buttons & ~IN_ATTACK);
return FMRES_HANDLED;
}
return FMRES_IGNORED;
}
public SprawdzSpalanie(id)
{
if(paliwo[id] > 0)
{
static Float:Last[33];

new Float:Now = get_gametime();
if((Now - Float:Last[id]) >= CO_ILE_SPALANIE)
{
Spalanie(id);

Last[id] = Now;
}
}
}
public SprawdzTankowanie(id)
{
if(paliwo[id] < MAX_PALIWO+floatround((cod_get_user_intelligence(id, 1, 1, 1)*WSPOLCZYNNIK_PALIWA), floatround_round))
{
static Float:Last[33];

new Float:Now = get_gametime();
if((Now - Float:Last[id]) >= CO_ILE_TANKOWANIE)
{
Tankowanie(id);

Last[id] = Now;
}
}
}
public Spalanie(id)
{
paliwo[id]--;
}
public Tankowanie(id)
{
paliwo[id]++;
}
public CurWeapon(id)
{
//new weapon = read_data(2);

if(ma_klase[id]) //tutaj wstawiamy ma_klase lub ma_perk
{
if(has_jp[id]) //tutaj ustawiamy broń, jakiej model będziemy zmieniać
{
set_pev(id, pev_viewmodel2, "models/v_egon.mdl")
set_pev(id, pev_weaponmodel2, "models/p_egon.mdl")
}
}
}
public smoke_effect(id)
{
new origin[3];
get_user_origin(id, origin, 0);
origin[2] = origin[2] - 10;

message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(17);
write_coord(origin[0]);
write_coord(origin[1]);
write_coord(origin[2]);
write_short(smoke);
write_byte(10);
write_byte(115);
message_end();
}
public JetPackOn(id)
{
if(!ma_klase[id])
{
return PLUGIN_HANDLED;
}
if(!is_user_alive(id))
{
client_print(id , print_center , "Nie mozesz zalozyc plecaka gdy nie zyjesz!");
return PLUGIN_HANDLED;
}

if(has_jp[id])
{
client_print(id , print_center , "Masz juz ubrany Jetpack!");
return PLUGIN_HANDLED;
}

has_jp[id] = true;

client_print(id , print_center , "Ubrales Jetpack! By go uzyc trzymaj klawisz skoku i kieruj myszka");

emit_sound(id , CHAN_VOICE , "items/gunpickup2.wav" , 1.0 , ATTN_NORM , 0 , PITCH_NORM);

return PLUGIN_HANDLED;
}
public JetPackOff(id)
{
if(!ma_klase[id])
{
return PLUGIN_HANDLED;
}

if(!has_jp[id])
{
client_print(id , print_center , "Nie masz ubranego Jetpacka!");
return PLUGIN_HANDLED;
}

client_print(id , print_center , "Zdjeles Jetpack!");

has_jp[id] = false;

return PLUGIN_HANDLED;
}
public Event_DeathMsg()
{
new victim = read_data(2)

if(!ma_klase[victim])
{
return PLUGIN_CONTINUE;
}

has_jp[victim] = false;

return PLUGIN_CONTINUE;
}
public did_not_start()
{
has_started = false;

new aPlayers[32] , iNum , i;
get_players(aPlayers, iNum);
for(i = 1; i <= iNum; i++)
{
has_jp[aPlayers[i]] = false;
}
new ent = -1;
while((ent = find_ent_by_class(ent , "jetpack")) != 0)
{
remove_entity(ent);
}
}
public did_start()
{
has_started = true;
}
public client_connect(id)
{
has_jp[id] = false;
}
public client_disconnect(id)
{
has_jp[id] = false;
}
public PobierzIlosc(id)
{
if(ma_klase[id])
return paliwo[id];
return 0;
}
public PobierzIloscMax(id)
{
if(ma_klase[id])
return MAX_PALIWO+floatround((cod_get_user_intelligence(id, 1, 1, 1)*WSPOLCZYNNIK_PALIWA), floatround_round);
return 0;
}
/*
******************************
* END OF FILE
******************************
*/
////////////////////////////


#2 YingYang

    Banned

  • Zbanowany

Reputacja: 2
Nowy

  • Postów:29
  • Imię:Bartosz
  • Lokalizacja:Połaniec
Offline

Napisano 18.02.2012 13:18

#include <amxmodx>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <codmod>
/*****KONFIGURACJA*****/
#define COLORCHAT
#define PREMIUM
#define PREDKOSC 500
#define MAX_PALIWO 50
#define WSPOLCZYNNIK_PALIWA 0.1
#define CO_ILE_TANKOWANIE 0.3
#define CO_ILE_SPALANIE 0.1
/*****KONFIGURACJA*****/
/*#define TASK_SPALANIE 666
#define TASK_TANKOWANIE 999*/
#if defined COLORCHAT
#include <colorchat>
#endif
new const PLUGIN[] = "Jetpack Lite";
new const VERSION[] = "1.0";
new const AUTHOR[] = "v3x & kisiel96";
new smoke;
new bool:has_jp[33];
new bool:has_started;
new frame[33];
new paliwo[33];
new max_paliwo[33];
new bool:ma_klase[33];
new const nazwa[] = "Rocketman";
new const opis[] = "Ma Jetpack (plecak odrzutowy)";
new const bronie = 1<<CSW_Famas | 1<<CSW_DEAGLE;
new const zdrowie = 20;
new const kondycja = -30;
new const inteligencja = 0;
new const wytrzymalosc = 20;
public plugin_init()
{
register_plugin(PLUGIN , VERSION , AUTHOR);
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_event("DeathMsg" , "Event_DeathMsg" , "a");
register_event("HLTV" , "did_not_start" , "a" , "1=0" , "2=0");
register_logevent("did_start" , 2 , "1=Round_Start");
register_event("ResetHUD", "ResetHUD", "abe");
register_event("CurWeapon","CurWeapon","be", "1=1")
register_forward(FM_PlayerPreThink, "PlayerPreThink")
register_forward(FM_UpdateClientData, "UpdateClientData_Post", 1)
register_forward(FM_CmdStart,"fwd_CmdStart")
}
public plugin_natives()
{
register_native("cod_get_user_class_fuel", "PobierzIlosc", 1);
register_native("cod_get_user_class_max_fuel", "PobierzIloscMax", 1);
}
public plugin_precache()
{
smoke = precache_model("sprites/lightsmoke.spr");
precache_model("models/p_egon.mdl")
precache_model("models/v_egon.mdl")
precache_sound("QTM_CodMod/jetpack.wav");
}
public cod_class_enabled(id)
{
#if defined PREMIUM
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
#if defined COLORCHAT
ColorChat(id, GREEN, "[Rocketman] Nie masz uprawnien, aby uzywac tej klasy.")
#endif
#if !defined COLORCHAT
client_print(id, print_chat, "[Rocketman] Nie masz uprawnien, aby uzywac tej klasy.")
#endif
return COD_STOP;
}
#endif
ma_klase[id] = true;
paliwo[id] = MAX_PALIWO+floatround((cod_get_user_intelligence(id, 1, 1, 1)*WSPOLCZYNNIK_PALIWA), floatround_round);
max_paliwo[id] = MAX_PALIWO+floatround((cod_get_user_intelligence(id, 1, 1, 1)*WSPOLCZYNNIK_PALIWA), floatround_round);
#if defined COLORCHAT
ColorChat(id, GREEN, "[Rocketman] Klasa stworzona przez kisiel96.");
#endif
#if !defined COLORCHAT
client_print(id, print_chat, "[Rocketman] Klasa stworzona przez kisiel96.");
#endif
#if defined PREMIUM
return COD_CONTINUE;
#endif
}
public cod_class_disabled(id)
{
ma_klase[id] = false;
has_jp[id] = false;
}
public cod_class_skill_used(id)
{
if(has_jp[id])
{
JetPackOff(id)
}
else
{
JetPackOn(id)
}
}
public ResetHUD(id)
paliwo[id] = MAX_PALIWO+floatround((cod_get_user_intelligence(id, 1, 1, 1)*WSPOLCZYNNIK_PALIWA), floatround_round);
public PlayerPreThink(id)
{
if(!is_user_connected(id) || !is_user_alive(id))
{
return FMRES_IGNORED;
}
if(!ma_klase[id])
{
return FMRES_IGNORED;
}
if(!has_jp[id])
{
SprawdzTankowanie(id)
return FMRES_IGNORED;
}
if(!has_started)
{
return FMRES_IGNORED;
}
else
{
SprawdzTankowanie(id)
}
set_pev(id, pev_button, pev(id,pev_button) & ~IN_ATTACK);
if(get_user_button(id) & IN_JUMP)
{
if(paliwo[id] > 0)
{
new Float:fAim[3] , Float:fVelocity[3];
VelocityByAim(id , PREDKOSC, fAim);

fVelocity[0] = fAim[0];
fVelocity[1] = fAim[1];
fVelocity[2] = fAim[2];

set_user_velocity(id , fVelocity);

entity_set_int(id , EV_INT_gaitsequence , 6);

emit_sound(id , CHAN_VOICE , "QTM_CodMod/jetpack.wav" , 1.0 , ATTN_NORM , 0 , PITCH_NORM);

if(frame[id] >= 3)
{
frame[id] = 0;
smoke_effect(id);
entity_set_string(id , EV_SZ_weaponmodel , "models/p_egon.mdl");
}
frame[id]++;

SprawdzSpalanie(id)


}
else
{
client_print(id, print_center, "Skonczylo Ci sie paliwo! Automatycznie zdjales Jetpack!");
has_jp[id] = false;

SprawdzTankowanie(id)
}
}
else
{
SprawdzTankowanie(id)
}
return FMRES_IGNORED;
}
public UpdateClientData_Post(id, sendweapons, cd_handle)
{
if(!is_user_connected(id))
{
return FMRES_IGNORED;
}
if(!is_user_alive(id))
{
return FMRES_IGNORED;
}
if(!ma_klase[id])
{
return FMRES_IGNORED;
}
if(has_jp[id])
{
set_cd(cd_handle, CD_flNextAttack, halflife_time() + 0.001 );
}
return FMRES_HANDLED;
}
public fwd_CmdStart(id, uc_handle, seed)
{
if(!is_user_connected(id))
{
return FMRES_IGNORED;
}
if(!is_user_alive(id))
{
return FMRES_IGNORED;
}
if(!ma_klase[id])
{
return FMRES_IGNORED;
}
new buttons = get_uc(uc_handle, UC_Buttons)
new oldbuttons = get_user_oldbutton(id);
if((buttons & IN_ATTACK) || !(oldbuttons & IN_ATTACK))
{
return FMRES_IGNORED;
}
if(has_jp[id])
{
set_uc(uc_handle, UC_Buttons, buttons & ~IN_ATTACK);
return FMRES_HANDLED;
}
return FMRES_IGNORED;
}
public SprawdzSpalanie(id)
{
if(paliwo[id] > 0)
{
static Float:Last[33];

new Float:Now = get_gametime();
if((Now - Float:Last[id]) >= CO_ILE_SPALANIE)
{
Spalanie(id);

Last[id] = Now;
}
}
}
public SprawdzTankowanie(id)
{
if(paliwo[id] < MAX_PALIWO+floatround((cod_get_user_intelligence(id, 1, 1, 1)*WSPOLCZYNNIK_PALIWA), floatround_round))
{
static Float:Last[33];

new Float:Now = get_gametime();
if((Now - Float:Last[id]) >= CO_ILE_TANKOWANIE)
{
Tankowanie(id);

Last[id] = Now;
}
}
}
public Spalanie(id)
{
paliwo[id]--;
}
public Tankowanie(id)
{
paliwo[id]++;
}
public CurWeapon(id)
{
//new weapon = read_data(2);
if(ma_klase[id]) //tutaj wstawiamy ma_klase lub ma_perk
{
if(has_jp[id]) //tutaj ustawiamy broń, jakiej model będziemy zmieniać
{
set_pev(id, pev_viewmodel2, "models/v_egon.mdl")
set_pev(id, pev_weaponmodel2, "models/p_egon.mdl")
}
}
}
public smoke_effect(id)
{
new origin[3];
get_user_origin(id, origin, 0);
origin[2] = origin[2] - 10;
message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(17);
write_coord(origin[0]);
write_coord(origin[1]);
write_coord(origin[2]);
write_short(smoke);
write_byte(10);
write_byte(115);
message_end();
}
public JetPackOn(id)
{
if(!ma_klase[id])
{
return PLUGIN_HANDLED;
}
if(!is_user_alive(id))
{
client_print(id , print_center , "Nie mozesz zalozyc plecaka gdy nie zyjesz!");
return PLUGIN_HANDLED;
}
if(has_jp[id])
{
client_print(id , print_center , "Masz juz ubrany Jetpack!");
return PLUGIN_HANDLED;
}
has_jp[id] = true;
client_print(id , print_center , "Ubrales Jetpack! By go uzyc trzymaj klawisz skoku i kieruj myszka");
emit_sound(id , CHAN_VOICE , "items/gunpickup2.wav" , 1.0 , ATTN_NORM , 0 , PITCH_NORM);
return PLUGIN_HANDLED;
}
public JetPackOff(id)
{
if(!ma_klase[id])
{
return PLUGIN_HANDLED;
}
if(!has_jp[id])
{
client_print(id , print_center , "Nie masz ubranego Jetpacka!");
return PLUGIN_HANDLED;
}
client_print(id , print_center , "Zdjeles Jetpack!");
has_jp[id] = false;
return PLUGIN_HANDLED;
}
public Event_DeathMsg()
{
new victim = read_data(2)
if(!ma_klase[victim])
{
return PLUGIN_CONTINUE;
}
has_jp[victim] = false;
return PLUGIN_CONTINUE;
}
public did_not_start()
{
has_started = false;
new aPlayers[32] , iNum , i;
get_players(aPlayers, iNum);
for(i = 1; i <= iNum; i++)
{
has_jp[aPlayers[i]] = false;
}
new ent = -1;
while((ent = find_ent_by_class(ent , "jetpack")) != 0)
{
remove_entity(ent);
}
}
public did_start()
{
has_started = true;
}
public client_connect(id)
{
has_jp[id] = false;
}
public client_disconnect(id)
{
has_jp[id] = false;
}
public PobierzIlosc(id)
{
if(ma_klase[id])
return paliwo[id];
return 0;
}
public PobierzIloscMax(id)
{
if(ma_klase[id])
return MAX_PALIWO+floatround((cod_get_user_intelligence(id, 1, 1, 1)*WSPOLCZYNNIK_PALIWA), floatround_round);
return 0;
}
/*
******************************
* END OF FILE
******************************
*/
////////////////////////////


powinno być okey jak nie to chociaż za starania daj + :P jestem początkujący

#3 Muzzi

    Guru

  • Przyjaciel

Reputacja: 228
Wszechwidzący

  • Postów:772
  • Lokalizacja:Kraków
Offline

Napisano 18.02.2012 14:00

Automatyczna wiadomość


Ten temat został przeniesiony z forum:
AMX Mod XPluginy AMXX
do
Scripting AMXXPluginy


  • +
  • -
  • 0




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

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