Author Topic: Ready made: Add Speed to Player ID  (Read 4857 times)

0 Members and 1 Guest are viewing this topic.

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Ready made: Add Speed to Player ID
« on: September 30, 2007, 10:16:33 am »

procedure AddSpeed(ID: byte; VectorX,VectorY,speed: single);[/b]

How to use the parameters:
ID:               Player ID to which the speedbonus shall be given

VectorX,VectorY:  Direction of the speedbonus. Use GetPlayerStat(ID,'VelX') and VelY here as default.
                  Put a minus infront of both such GetPlayerStat to create a slowing effect.


speed:            Strength of the speedbonus. This is an appropriate value and not absolute.
                  A negative speed value will make the AddSpeed procedure have no effect.




This procedure also creates a blood effect (because of player being pushed by bullets) that can look a bit weird. This procedure will not work on players with the ID 32. This procedure does little if used once, better use it contineously, like in the code example with AppOnIdle.
Enjoy ~ Avarax
[/i]
« Last Edit: September 30, 2007, 10:58:59 am by Avarax »
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline Ali.Man

  • Major(1)
  • Posts: 21
Re: Ready Made: Add Speed to Player ID
« Reply #1 on: September 30, 2007, 10:43:02 am »
you haxx0r!!!!

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: Ready made: Add Speed to Player ID
« Reply #2 on: September 30, 2007, 12:45:09 pm »
LoL. Interesting script.
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline PKS|Shooter

  • Soldier
  • **
  • Posts: 130
  • Dont fuck with us!
    • PKS - La Familia
Re: Ready made: Add Speed to Player ID
« Reply #3 on: November 15, 2007, 02:49:43 pm »
nice nice ;D

Offline chutem

  • Veteran
  • *****
  • Posts: 1119
Re: Ready made: Add Speed to Player ID
« Reply #4 on: November 16, 2007, 07:05:56 pm »
lol
1NK3FbdNtH6jNH4dc1fzuvd4ruVdMQABvs

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6144
    • Ultimate 13 Soldat
Re: Ready made: Add Speed to Player ID
« Reply #5 on: November 17, 2007, 02:45:16 pm »
lol

This user was warned for this post

Offline zop

  • Major
  • *
  • Posts: 81
Re: Ready made: Add Speed to Player ID
« Reply #6 on: August 09, 2008, 08:05:56 am »
Can anyone post this script again plz?
or files?

http://122.116.167.31:23238:23238/galavela/?inc=player&name=%5BTomato+Bird%5D+Cibo[/size=1]

Offline UnknownSniper

  • Camper
  • ***
  • Posts: 428
  • Southern by the Grace of God
Re: Ready made: Add Speed to Player ID
« Reply #7 on: August 09, 2008, 10:10:37 am »
lol

This user was warned for this post

Wouldn't it be more logical to PM the user's that are warned, instead of breaking forum rules yourself by also posting off-topic and useless posts?

Anyways, this is a nice script. It'd be used on climb I'm sure.
I had a job and a piece of land
My sweet wife was my best friend
But I traded that for Cocaine and a whore
-Jamey Johnson


Offline rayanaga

  • Soldier
  • **
  • Posts: 143
  • ~Fur flying~
    • Kryonex
Re: Ready made: Add Speed to Player ID
« Reply #8 on: August 16, 2008, 06:56:09 pm »
Can anyone post this script again plz?
or files?

Yes, could anyone repost this script?
The link doesn't seem to work.

It seems like a neat little script.

Thanks in advance!
[kY] Kryonex - Your local zombie fanatics.
http://www.kryonex.com/

Offline BondJamesBond

  • Flagrunner
  • ****
  • Posts: 986
    • http://tobylands.com
Re: Ready made: Add Speed to Player ID
« Reply #9 on: August 18, 2008, 02:10:59 am »
Link broken.. :(
The computer is a moron.
?  - Peter Drucker

Offline UPNPAD

  • Major(1)
  • Posts: 36
Re: Ready made: Add Speed to Player ID
« Reply #10 on: August 18, 2008, 02:45:45 am »
Code: [Select]
procedure AddSpeed(const ID,owner: byte; VectorX,VectorY,speed: single);
var X,Y,add: single;
begin
  If (VectorX <> 0) or (VectorY <> 0) then begin
    X:=VectorX/sqrt(VectorX*VectorX + VectorY*VectorY);
    Y:=VectorY/sqrt(VectorX*VectorX + VectorY*VectorY);
    add:=20 + speed;
    CreateBullet(GetPlayerStat(ID,'X') + GetPlayerStat(ID,'VelX') * 5 - add * X,GetPlayerStat(ID,'Y') + GetPlayerStat(ID,'VelY') * 5 - add * Y,X * speed,Y * speed,0,11,owner);
    CreateBullet(GetPlayerStat(ID,'X') + GetPlayerStat(ID,'VelX') * 5 - add * X + Y * 3,GetPlayerStat(ID,'Y') + GetPlayerStat(ID,'VelY') * 5 - add * Y + X * 2,X * speed,Y * speed,0,11,owner);
    CreateBullet(GetPlayerStat(ID,'X') + GetPlayerStat(ID,'VelX') * 5 - add * X + Y * 6,GetPlayerStat(ID,'Y') + GetPlayerStat(ID,'VelY') * 5 - add * Y + X * 4,X * speed,Y * speed,0,11,owner);
    CreateBullet(GetPlayerStat(ID,'X') + GetPlayerStat(ID,'VelX') * 5 - add * X + Y * 9,GetPlayerStat(ID,'Y') + GetPlayerStat(ID,'VelY') * 5 - add * Y + X * 4,X * speed,Y * speed,0,11,owner);
    CreateBullet(GetPlayerStat(ID,'X') + GetPlayerStat(ID,'VelX') * 5 - add * X - Y * 3,GetPlayerStat(ID,'Y') + GetPlayerStat(ID,'VelY') * 5 - add * Y - X * 2,X * speed,Y * speed,0,11,owner);
    CreateBullet(GetPlayerStat(ID,'X') + GetPlayerStat(ID,'VelX') * 5 - add * X - Y * 6,GetPlayerStat(ID,'Y') + GetPlayerStat(ID,'VelY') * 5 - add * Y - X * 4,X * speed,Y * speed,0,11,owner);
    CreateBullet(GetPlayerStat(ID,'X') + GetPlayerStat(ID,'VelX') * 5 - add * X - Y * 9,GetPlayerStat(ID,'Y') + GetPlayerStat(ID,'VelY') * 5 - add * Y - X * 4,X * speed,Y * speed,0,11,owner);
  end;
end;

Copied and pasted from MMod v1.1. Enjoy ;)

Offline rayanaga

  • Soldier
  • **
  • Posts: 143
  • ~Fur flying~
    • Kryonex
Re: Ready made: Add Speed to Player ID
« Reply #11 on: August 18, 2008, 12:12:35 pm »
Thank you UPNPAD.
I appreciate it. ;D
[kY] Kryonex - Your local zombie fanatics.
http://www.kryonex.com/