public PolozDynamit(id)
{
if(!ilosc_dynamitow_gracza[id])
{
client_print(id, print_center, "Wykorzystales juz caly dynamit!");
return PLUGIN_CONTINUE;
}
if(inteligencja_gracza[id] < 1)
client_print(id, print_center, "Aby wzmocnic dynamit, zwieksz inteligencje!");
ilosc_dynamitow_gracza[id]--;
new Float:fOrigin[3], iOrigin[3];
entity_get_vector( id, EV_VEC_origin, fOrigin);
iOrigin[0] = floatround(fOrigin[0]);
iOrigin[1] = floatround(fOrigin[1]);
iOrigin[2] = floatround(fOrigin[2]);
message_begin(MSG_BROADCAST,SVC_TEMPENTITY, iOrigin);
write_byte(TE_EXPLOSION);
write_coord(iOrigin[0]);
write_coord(iOrigin[1]);
write_coord(iOrigin[2]);
write_short(sprite_blast);
write_byte(32);
write_byte(20);
write_byte(0);
message_end();
message_begin( MSG_BROADCAST, SVC_TEMPENTITY, iOrigin );
write_byte( TE_BEAMCYLINDER );
write_coord( iOrigin[0] );
write_coord( iOrigin[1] );
write_coord( iOrigin[2] );
write_coord( iOrigin[0] );
write_coord( iOrigin[1] + 300 );
write_coord( iOrigin[2] + 300 );
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( 255 ); // r, g, b
write_byte( 100 );// r, g, b
write_byte( 100 ); // r, g, b
write_byte( 128 ); // brightness
write_byte( 8 ); // speed
message_end();
new entlist[33];
new numfound = find_sphere_class(id, "player", 300.0 , entlist, 32);
for (new i=0; i < numfound; i++)
{
new pid = entlist;
if (!is_user_alive(pid) || get_user_team(id) == get_user_team(pid) || informacje_przedmiotu_gracza[pid][0] == 24)
continue;
ExecuteHam(Ham_TakeDamage, pid, 0, id, 90.0+float(inteligencja_gracza[id]) , 1);
Proszę o pomoc.
[i]Dodano 15 kwiecień 2011 - 14:09:
refresh pomocy