O to kod:
public cmdBlyskawica(id){
if(!is_user_alive(id)) return PLUGIN_HANDLED;
if(!ilosc_blyskawic[id]) {
client_print(id,print_chat,"Nie posiadasz wiecej blyskawic");
return PLUGIN_HANDLED;
}
if(poprzednia_blyskawica[id]+2.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]--;
new ofiara, body;
get_user_aiming(id, ofiara, body);
if(is_user_alive(ofiara)){
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 = 50.0, Float:fCzas = 1.0){
//Obrazenia
new ent = create_entity("info_target");
entity_set_string(ent, EV_SZ_classname, "blyskawica");
ExecuteHamB(Ham_TakeDamage, ofiara, ent, id, fObrazenia, 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);
}
PS: jakby ktos mowil uzyj opcji szukaj to ja juz szukalem ale nie ma tego napisanego,