public Effect_Ignite_brontotem(ent)
{
//Safe check because effect on death
if (!freeze_ended)
remove_entity(ent)
if (!is_valid_ent(ent))
return PLUGIN_CONTINUE
new id = pev(ent,pev_owner)
//Apply and destroy
if (pev(ent,pev_euser3) == 1)
{
new entlist[513]
new numfound = find_sphere_class(ent,"player",player_b_firetotem[id]+0.0,entlist,512)
for (new i=0; i < numfound; i++)
{
new pid = entlist[i]
//This totem can hit the caster
if (pid == id && is_user_alive(id))
{
Effect_Ignite(pid,id,4)
hudmsg(pid,3.0,"Palisz sie. Strzel do kogos aby przestac sie palic!")
continue
}
if (!is_user_alive(pid) || get_user_team(id) == get_user_team(pid))
continue
//Dextery makes the fire damage less
if (player_dextery[pid] > 20)
Effect_Ignite(pid,id,1)
else if (player_dextery[pid] > 15)
Effect_Ignite(pid,id,2)
else if (player_dextery[pid] > 10)
Effect_Ignite(pid,id,3)
else
Effect_Ignite(pid,id,4)
hudmsg(pid,3.0,"Palisz sie. Strzel do kogos aby przestac sie palic!")
}
remove_entity(ent)
return PLUGIN_CONTINUE
}
//Entity should be destroyed because livetime is over
if (pev(ent,pev_ltime) < halflife_time())
{
set_pev(ent,pev_euser3,1)
//Show animation and die
new Float:forigin[3], origin[3]
pev(ent,pev_origin,forigin)
FVecIVec(forigin,origin)
//Find people near and give them health
message_begin( MSG_BROADCAST, SVC_TEMPENTITY, origin );
write_byte( TE_BEAMCYLINDER );
write_coord( origin[0] );
write_coord( origin[1] );
write_coord( origin[2] );
write_coord( origin[0] );
write_coord( origin[1] + player_b_firetotem[id]);
write_coord( origin[2] + player_b_firetotem[id]);
write_short( sprite_white );
write_byte( 0 ); // startframe
write_byte( 0 ); // framerate
write_byte( 10 ); // life
write_byte( 10 ); // width
write_byte( 255 ); // noise
write_byte( 150 ); // r, g, b
write_byte( 150 ); // r, g, b
write_byte( 0 ); // r, g, b
write_byte( 128 ); // brightness
write_byte( 5 ); // speed
message_end();
set_pev(ent,pev_nextthink, halflife_time() + 0.2)
}
else
{
set_pev(ent,pev_nextthink, halflife_time() + 1.5)
}
return PLUGIN_CONTINUE
}
Moje pytanie to jak edytować powyższego publika by totem po postawieniu dawał ak47. Dodatkowo proszę o zmiane koloru totemu a obojętnie jaka poza żółtą i czerwoną.