dziś pokażę wam jak dodać je do diablo :F
u góry
#define TASK_ENTANGLEWAIT 928 new zatakowany[33],totemstop[33] ///////////////// (dalem na 2 zmienne mozna na 1 )up polecam wyzerować w roundstart jak ktoś chce
plugin_precachedodaj
precache_sound("diablosound/korzen.wav");
w
public damage(id)dodaj
add_bonus_korzen(attacker_id,id)
w
set_speedchange(id)nad
set_user_maxspeed(id, agi + speeds)dodaj
if(totemstop[id] == 1) speeds -= 9250jakby ktoś nie wiedzial
if(totemstop[id] == 1) speeds -= 9250 set_user_maxspeed(id, agi + speeds)
to na koniec
Spoiler
public add_bonus_korzen(attacker_id,id) { if(player_class[attacker_id] == np klasa && (random_num(1,5) == 1) && get_user_team(attacker_id) != get_user_team(id)){ if (!is_user_alive(id)) return PLUGIN_HANDLED if (zatakowany[id] == 1) return PLUGIN_HANDLED NE_ULT_Entangle(id) zatakowany[id] = 1 } return PLUGIN_HANDLED } stock Create_TE_BEAMFOLLOW(entity, iSprite, life, width, red, green, blue, alpha){ message_begin( MSG_BROADCAST, SVC_TEMPENTITY ) write_byte( TE_BEAMFOLLOW ) write_short( entity ) // entity write_short( iSprite ) // model write_byte( life ) // life write_byte( width ) // width write_byte( red ) // red write_byte( green ) // green write_byte( blue ) // blue write_byte( alpha ) // brightness message_end() } public Create_TE_BE(start[3], end[3],startFrame, frameRate, life, width, noise, red, green, blue, alpha, spid,sprite){ message_begin( MSG_BROADCAST, SVC_TEMPENTITY ) write_byte( TE_BEAMPOINTS ) write_coord( start[0] ) write_coord( start[1] ) write_coord( start[2] ) write_coord( end[0] ) write_coord( end[1] ) write_coord( end[2] ) write_short( sprite ) // model write_byte( startFrame ) // start frame write_byte( frameRate ) // framerate write_byte( life ) // life write_byte( width ) // width write_byte( noise ) // noise write_byte( red ) // red write_byte( green ) // green write_byte( blue ) // blue write_byte( alpha ) // brightness write_byte( spid ) // speed message_end() } public NE_ULT_Entangle(iEnemy ) { // Follow the user until they stop moving... Create_TE_BEAMFOLLOW( iEnemy, sprite_smoke1, 10, 5, 10, 108, 23, 255 ); new parm[4]; parm[0] = iEnemy; parm[1] = 0; parm[2] = 0; parm[3] = 0; _NE_ULT_EntangleWait( parm ); } // Wait for the user to stop moving public _NE_ULT_EntangleWait( parm[4] ) { new id = parm[0]; new vOrigin[3]; get_user_origin( id, vOrigin ); // Checking to see if the user has actually stopped yet? if ( vOrigin[0] == parm[1] && vOrigin[1] == parm[2] && vOrigin[2] == parm[3] ) { NE_ULT_EntangleEffect( id ) } else { parm[1] = vOrigin[0]; parm[2] = vOrigin[1]; parm[3] = vOrigin[2]; set_task( 0.1, "_NE_ULT_EntangleWait", TASK_ENTANGLEWAIT + id, parm, 4 ); } return; } public NE_ULT_EntangleEffect( id ) { if(!is_user_alive(id)) return 1; totemstop[id] = 1 set_speedchange(id) set_task( 10.0, "off_zamroz",TASK_ENTANGLEWAIT + id) // Get the user's origin new vOrigin[3]; get_user_origin( id, vOrigin ); // Play the entangle sound emit_sound( id, CHAN_STATIC, "diablosound/korzen.wav", 1.0, ATTN_NORM, 0, PITCH_NORM ); new iStart[3], iEnd[3], iHeight; new iRadius = 20, iCounter = 0; new x1, y1, x2, y2; // Some sweet crap that I don't understand courtesy of SpaceDude - draws the "cylinder" around the player while ( iCounter <= 7 ) { if ( iCounter == 0 || iCounter == 8 ) x1 = -iRadius; else if ( iCounter == 1 || iCounter == 7 ) x1 = -iRadius * 100/141; else if ( iCounter == 2 || iCounter == 6 ) x1 = 0; else if ( iCounter == 3 || iCounter == 5 ) x1 = iRadius*100/141 else if ( iCounter == 4 ) x1 = iRadius if ( iCounter <= 4 ) y1 = sqroot( iRadius*iRadius-x1*x1 ); else y1 = -sqroot( iRadius*iRadius-x1*x1 ); ++iCounter; if ( iCounter == 0 || iCounter == 8 ) x2 = -iRadius; else if ( iCounter == 1 || iCounter==7 ) x2 = -iRadius*100/141; else if ( iCounter == 2 || iCounter==6 ) x2 = 0; else if ( iCounter == 3 || iCounter==5 ) x2 = iRadius*100/141; else if ( iCounter == 4 ) x2 = iRadius; if ( iCounter <= 4 ) y2 = sqroot( iRadius*iRadius-x2*x2 ); else y2 = -sqroot( iRadius*iRadius-x2*x2 ); iHeight = 16 + 2 * iCounter; while ( iHeight > -40 ) { iStart[0] = vOrigin[0] + x1; iStart[1] = vOrigin[1] + y1; iStart[2] = vOrigin[2] + iHeight; iEnd[0] = vOrigin[0] + x2; iEnd[1] = vOrigin[1] + y2; iEnd[2] = vOrigin[2] + iHeight + 2; Create_TE_BE( iStart, iEnd, 0, 0, 100, 10, 5, 10, 108, 23, 255, 0 ,sprite_beam); iHeight -= 16; } } return 0; } public off_zamroz(pid){ pid -=TASK_ENTANGLEWAIT totemstop[pid] = 0 zatakowany[pid] = 0 set_speedchange(pid) }
myślę ze o niczym nie zapomniałem jak coś piszcie.
Załączone pliki
-
korzen.wav 35,05 KB 147 Ilość pobrań