Official Soldat Forums

Server Talk => Scripting Releases => Topic started by: ~Niko~ on January 01, 2009, 05:44:30 pm

Title: Vest on cap
Post by: ~Niko~ on January 01, 2009, 05:44:30 pm
My first script. Thanks to #soldat.devs guys for helping me out.

Script Name: Vest on cap
Script Description Vest, simple
Author: Niko (http://soldatcentral.com/index.php?page=profile&u=104)
Compile Test: (http://soldatcentral.com/images/pass.gif) Passed
Core Version: 2.6.3
Hosted by: Soldat Central - http://soldatcentral.com/ (http://soldatcentral.com/)

Full Description:
This script automatically gives a bulletproof vest to anyone who caps. It also shows a message indicating that you won it.

Code: [Select]
procedure OnFlagScore(ID, TeamFlag: byte);

begin
GiveBonus(ID, 3);
DrawText(0,'You won a vest by capping',300,RGB(255,255,255),0.10,0,20);
end;

(http://img55.imageshack.us/img55/8866/vestoncapig0.th.png) (http://img55.imageshack.us/my.php?image=vestoncapig0.png)
In game it doesn't say "earnt". It says "won". I was too lazy to make another screenie.


(http://soldatcentral.com/images/download.gif) (http://soldatcentral.com/dl.php?id=81&act=1)
(Size 411 B)
- http://soldatcentral.com/index.php?page=script&f=81 -


** Script hosted by Soldat Central (http://soldatcentral.com/index.php?page=script&f=81)! Please visit the author's script page (http://soldatcentral.com/index.php?page=script&f=81) and Rate this script **
Title: Re: Vest on cap
Post by: GSx_Major on January 01, 2009, 11:15:13 pm
It draws the text to all players...?
Title: Re: Vest on cap
Post by: Iq Unlimited on January 01, 2009, 11:51:58 pm
Might want to make it
DrawText(ID,'You won a vest by capping',300,RGB(255,255,255),0.10,0,20);
Title: Re: Vest on cap
Post by: iDante on January 02, 2009, 12:54:04 am
Also, I'd suggest using WriteConsole for this, as it won't overwrite the "x Team has Scored" text.
Title: Re: Vest on cap
Post by: ~Niko~ on January 02, 2009, 07:18:07 am
ok I'll make these changes when I have time.
Title: Re: Vest on cap
Post by: Vyka on January 02, 2009, 01:01:07 pm
Code: [Select]
procedure OnFlagScore(ID, TeamFlag: byte);

begin
GiveBonus(ID, 3);
WriteConsole(ID,'You won a vest by capping',$ff0000);
end;

take