Official Soldat Forums

Server Talk => Scripting Releases => Topic started by: Avarax on September 30, 2007, 10:16:33 am

Title: Ready made: Add Speed to Player ID
Post by: Avarax on September 30, 2007, 10:16:33 am
The code... (http://nopaste.org/p/aRvfCHcgY)

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]
Title: Re: Ready Made: Add Speed to Player ID
Post by: Ali.Man on September 30, 2007, 10:43:02 am
you haxx0r!!!!
Title: Re: Ready made: Add Speed to Player ID
Post by: xmRipper on September 30, 2007, 12:45:09 pm
LoL. Interesting script.
Title: Re: Ready made: Add Speed to Player ID
Post by: PKS|Shooter on November 15, 2007, 02:49:43 pm
nice nice ;D
Title: Re: Ready made: Add Speed to Player ID
Post by: chutem on November 16, 2007, 07:05:56 pm
lol
Title: Re: Ready made: Add Speed to Player ID
Post by: FliesLikeABrick on November 17, 2007, 02:45:16 pm
lol

This user was warned for this post
Title: Re: Ready made: Add Speed to Player ID
Post by: zop on August 09, 2008, 08:05:56 am
Can anyone post this script again plz?
or files?
Title: Re: Ready made: Add Speed to Player ID
Post by: UnknownSniper 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.
Title: Re: Ready made: Add Speed to Player ID
Post by: rayanaga 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!
Title: Re: Ready made: Add Speed to Player ID
Post by: BondJamesBond on August 18, 2008, 02:10:59 am
Link broken.. :(
Title: Re: Ready made: Add Speed to Player ID
Post by: UPNPAD 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 ;)
Title: Re: Ready made: Add Speed to Player ID
Post by: rayanaga on August 18, 2008, 12:12:35 pm
Thank you UPNPAD.
I appreciate it. ;D