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
 

bugg - zdjęcie

bugg

Rejestracja: 18.04.2012
Aktualnie: Nieaktywny
Poza forum Ostatnio: 09.02.2013 19:16
-----

Moje tematy

what´s wrong in this code??? (Auto message delay with cvar)

17.08.2012 17:56


#include <amxmodx>

/*---------------EDIT ME------------------*/
#define ADMIN_CHECK ADMIN_KICK
#define TASKID_ANNOUNCE 219348092123573721

static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
/*----------------------------------------*/
new cvar_delay
new maxplayers
new gmsgSayText

public plugin_init() {
register_plugin("Admin Check", "1.51", "OneEyed")
maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")

register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
cvar_delay = register_cvar("admins_delay", "30.0")

if (get_pcvar_float(cvar_delay) > 0.0)
if (!task_exists(TASKID_ANNOUNCE))
set_task(get_pcvar_float(cvar_delay), "print_adminlist", TASKID_ANNOUNCE, "", 0, "b")

}


public print_adminlist(user)
{
new adminnames[33][32]
new message[256]
new contactinfo[256], contact[112]
new id, count, x, len

for(id = 1 ; id <= maxplayers ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & ADMIN_CHECK)
get_user_name(id, adminnames[count++], 31)

len = format(message, 255, "%s ADMINS ONLINE: ",COLOR)
if(count > 0) {
for(x = 0 ; x < count ; x++) {
len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
if(len > 96 ) {
print_message(user, message)
len = format(message, 255, "%s ",COLOR)
}
}
print_message(user, message)
}
else {
len += format(message[len], 255-len, "No admins online.")
print_message(user, message)
}

get_cvar_string("amx_contactinfo", contact, 63)
if(contact[0]) {
format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact)
print_message(user, contactinfo)
}
}

print_message(id, msg[]) {
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}

// not found, server shutting down, what´s wrong in this code?

Codclass_elektryk (HELP)

14.07.2012 22:56

Ok.

this is the codclass --> http://amxx.pl/topic...klasa-elektryk/


Ok,

Look that:

new ofiara, body;
get_user_aiming(id, ofiara, body);

if(is_user_alive(ofiara)){


Ok, with this.... Only can use the THUNDER, when your crosshair is in a player.

I want to use the ability when the enemy is in my vision.

Is it posible?

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <codmod>
#include <engine>
#include <hamsandwich>

new sprite;
new ilosc_blyskawic[33],poprzednia_blyskawica[33];
new const gszSound[] = "ambience/thunder_clap.wav";

new const nazwa[] = "Elektryk";
new const opis[] = "Masz 3 blyskawice. ( Uzycie: klawisz E )";
new const bronie = 1<<CSW_M4A1 | 1<<CSW_M249;
new const zdrowie = 40;
new const kondycja = 40;
new const inteligencja = 20;
new const wytrzymalosc = 20;

new ma_klase[33]

public plugin_init() {
register_plugin(nazwa, "1.0", "piterka");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);


register_event("ResetHUD", "ResetHUD", "abe");
}

public plugin_precache()
{
sprite = precache_model("sprites/lgtning.spr");
precache_sound(gszSound);
}

public cod_class_enabled(id)
{
ilosc_blyskawic[id] = 3;
ma_klase[id] = 1;

return COD_CONTINUE;
}

public cod_class_disabled(id)
{
ma_klase[id] = 0;
ilosc_blyskawic[id] = 0;
}

public cod_class_skill_used(id) {

if(!is_user_alive(id)) return PLUGIN_HANDLED;

if(!ilosc_blyskawic[id]) {
return PLUGIN_HANDLED;
}
new ofiara, body;
get_user_aiming(id, ofiara, body);

if(is_user_alive(ofiara)){
if(get_user_team(ofiara) == get_user_team(id)) {
return PLUGIN_HANDLED;
}

if(poprzednia_blyskawica[id]+5.0>get_gametime()) {
client_print(id,print_chat,"Blyskawicy mozesz uzyc raz na 5 sek.");
return PLUGIN_HANDLED;
}
poprzednia_blyskawica[id] = floatround(get_gametime());
ilosc_blyskawic[id]--;

puscBlyskawice(id, ofiara, 50.0, 0.5);
}
return PLUGIN_HANDLED;
}

stock Create_TE_BEAMENTS(startEntity, endEntity, iSprite, startFrame, frameRate, life, width, noise, red, green, blue, alpha, speed) {
message_begin( MSG_BROADCAST, SVC_TEMPENTITY )
write_byte( TE_BEAMENTS )
write_short( startEntity ) // start entity
write_short( endEntity ) // end entity
write_short( iSprite ) // model
write_byte( startFrame ) // starting frame
write_byte( frameRate ) // frame rate
write_byte( life ) // life
write_byte( width ) // line width
write_byte( noise ) // noise amplitude
write_byte( red ) // red
write_byte( green ) // green
write_byte( blue ) // blue
write_byte( alpha ) // brightness
write_byte( speed ) // scroll speed
message_end()
}
puscBlyskawice(id, ofiara, Float:fObrazenia = 55.0, Float:fCzas = 1.0){
//Obrazenia
new ent = create_entity("info_target");
entity_set_string(ent, EV_SZ_classname, "blyskawica");
cod_inflict_damage(id, ofiara, fObrazenia, 1.0, ent, DMG_SHOCK);

remove_entity(ent);

//Piorun
Create_TE_BEAMENTS(id, ofiara, sprite, 0, 10, floatround(fCzas*10), 150, 5, 200, 200, 200, 200, 10);

//Dzwiek
emit_sound(id, CHAN_WEAPON, gszSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
emit_sound(ofiara, CHAN_WEAPON, gszSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
}


public ResetHUD(id) {
if(ma_klase[id] == 1) {
ilosc_blyskawic[id] = 3;
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/

[SOLVED] More health on COD MOD

08.07.2012 12:08

When I up level and put a point in life, how i do to do 2 healts points in life of player?

is this?:

zdrowie_klas[MAX_ILOSC_KLAS+1], ---> TO zdrowie_klas[MAX_ILOSC_KLAS+2],

Or.. is this?

register_native("cod_points_to_health", "PrzydzielZdrowie", 1); ----> TO register_native("cod_points_to_health", "PrzydzielZdrowie", 2);

??

PLZ HELP

Put nazwa_perku in wymiana_perkami.sma

27.05.2012 19:00

Ok, i like this pluggin.

But have some problems... in menu, cant see the PERK NAME ,

LOOK THAT: ( I ADD Some ideas with green letters).

cod_get_perk_name

get_user_name(id, nick, charsmax(nick))
formatex(nazwa_menu, charsmax(nazwa_menu), "Wymien sie perkiem z %s: PERK %s", nick ,NAZWA_PERKU)

new menu2 = menu_create(nazwa_menu, "menu_wymien");

menu_additem(menu2, "Tak", nick, nazwa_perku);
menu_addblank(menu2, 0)
menu_additem(menu2, "Nie", nick);

menu_setprop(menu2, MPROP_EXITNAME, "Wyjdz");
menu_display(oddaj_id[item], menu2);
return PLUGIN_CONTINUE;
}


I would like add name PERK on the menu --> "Wymien sie perkiem z %s: PERK %s", nick ,NAZWA_PERKU)

But i dont know how do it...
Any1 can do it?

Sma here --> http://amxx.pl/topic...ymiana-perkami/

prośba o klase

18.05.2012 13:41

nazwa: Maromo
zdrowie: 10
kondycja: 5
wytrzymałość: 10
inteligencja: 15

BRONIE: ma50%kradzieży perk wroga, (MENU Yes, No)


klasa taistnieje, alenie znalezionoprzezforum

thx