Official Soldat Forums
Server Talk => Scripting Discussions and Help => Topic started by: Hacktank on November 09, 2008, 05:23:05 pm
-
I am making a script that shows the number of caps each person has at the end of the round but I cant get GetPlayerStat(ID,'Flags') to work (it always turns up 0).
1) Why won't GetPlayerStat(ID,'Flags') work?
2) Is it possible to change a player var such as health with GetPlayerStat(ID,'Heath') := GetPlayerStat(ID,'Health') + 50
3) Is there an event for the round being over (when it freezes and shows the scores) that I can use instead of OnMapChange?
Thank you. :)
-
2)
DoDamage (http://enesce.com/help/index.html?Functions/DoDamage.html). Give negative damage.
3)
procedure AppOnIdle(Ticks: integer);
begin
if TimeLeft = 0 then begin
// more code here
end;
end;
-
Thanks!
I know that the normal hp is 150 but if I did DoDamage(ID,149) would that leave you with 1 hp or is it highly different values like the weapon mod damage?
-
Flags will be in the next server version.
As for the end of round event, there is none. You should check this (http://forums.soldat.pl/index.php?topic=26477.0). Also, just checking if the time is out isn't gonna do it. You need to check score limits and commands too.
-
Thanks!
I know that the normal hp is 150 but if I did DoDamage(ID,149) would that leave you with 1 hp or is it highly different values like the weapon mod damage?
DoDamage(ID,149) does 149 points of damage.
Yes they will have 1 health left.
-
Ok thanks guys, on to the next addition to the all purpose script :).
@GSx_Major: Thanks but::
1) I dont get crossfunc.
2) Thats to much a pain in the arse.
Problem Solved!
-
as for number 1, you should make an array of 32 integers, and on each cap, add 1 to the array[id] for the person that capped
as for 2 and 3, these ware explained
-
That is exactly what i started doing. :)