Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // UPDATED VERSION: https://github.com/S0lll0s/csgo-vscripts/blob/master/nadetraining.nut / http://pastebin.com/6mV7LbiU
- this.pos <- null;
- this.vel <- null;
- function savePos() {
- local nade = null;
- while ( Entities.FindByClassname(nade, "flashbang_projectile") != null ) {
- nade = Entities.FindByClassname(nade, "flashbang_projectile");
- ScriptPrintMessageCenterAll( "found flash" );
- pos = nade.GetCenter();
- vel = nade.GetVelocity();
- }
- nade = null;
- while ( Entities.FindByClassname(nade, "hegrenade_projectile") != null ) {
- nade = Entities.FindByClassname(nade, "hegrenade_projectile");
- ScriptPrintMessageCenterAll( "found nade" );
- pos = nade.GetCenter();
- vel = nade.GetVelocity();
- }
- }
- function restorePos() {
- local nade = null;
- while ( Entities.FindByClassname(nade, "flashbang_projectile") != null ) {
- nade = Entities.FindByClassname(nade, "flashbang_projectile");
- if ( pos != null ) {
- nade.SetAbsOrigin(pos);
- nade.SetVelocity( vel );
- }
- }
- nade = null;
- while ( Entities.FindByClassname(nade, "hegrenade_projectile") != null ) {
- nade = Entities.FindByClassname(nade, "hegrenade_projectile");
- if ( pos != null ) {
- nade.SetAbsOrigin(pos);
- nade.SetVelocity( vel );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement