Author Topic: Death Information  (Read 11111 times)

0 Members and 1 Guest are viewing this topic.

Offline rumpel

  • Camper
  • ***
  • Posts: 410
Re: Death Information
« Reply #20 on: March 29, 2008, 02:48:19 pm »
works fine on windows and on selfkill :d
banned.

Offline VenTeR

  • Major(1)
  • Posts: 5
Re: Death Information
« Reply #21 on: March 30, 2008, 03:20:04 am »
hah!:)very fun,but server shutdown!!!!

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Death Information
« Reply #22 on: March 30, 2008, 04:51:25 pm »
hah!:)very fun,but server shutdown!!!!
Then you did something wrong.
I just tested to see if it compiles, which it does.

make sure the server starts w/out the script, if not, get a fresh new server and modify soldat.ini and test again..
create a folder under the scripts folder, name it "Death Info"
Inside Death Info....
create a file Includes.txt and inside that put "core.pas"
create a file core.pas and inside that, paste the code.

Offline Miszkol_

  • Major(1)
  • Posts: 30
  • The Piccolo Power xD
Re: Death Information
« Reply #23 on: April 22, 2008, 04:03:10 pm »
1. My server config:
- Counter-Strike script v1.01
- realistic mode - on
- Survival mode - on
- (...and more scripts. This is important scripts on my server, but i think Death Info script may collide with that scripts.)

2. When someone kill someone Info of Death only flash on screen (least on my screen) and disappear...
I think this script maybe collide with other scripts.

3. ...And IMPORTANT something:
I have a Idea :):
When someone want Info of dead to write command /me or /deadinfo or ...
Only someone want to get info to write command. I think it's better result and don't do chaos on screen... ;D

H.E.L.P M.E
English is hard language, please forget my bad :P

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Death Information
« Reply #24 on: April 22, 2008, 07:28:22 pm »
Miszkol_, the problem is that only one message may be on the screen at a time. The Counter-Strike script draws a person's amount of money every second, and this script is trying to draw the text right after a person dies, so it gives the person less than a second to see.
A way to fix this is by having the script only update everybody's cash every few seconds, or I could modify this script to use WriteConsole instead (draw's in the person's console) (much easier) of DrawText, which i just did:
Code: [Select]
var
  Realistic: boolean;
  Hits: array[1..32] of array[1..32] of byte;
  Dmg: array[1..32] of array[1..32] of longint;

procedure ActivateServer();
begin
  if StrtoInt(ReadINI('Soldat.ini','GAME','Realistic_Mode','0')) = 1 then Realistic := true else Realistic := false;
end;

procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);
var
  i: byte;
begin
  if Killer <> Victim then begin
    WriteConsole(Victim, GetPlayerStat(Killer, 'Name') + ' killed you with ' + iif(Hits[Victim][Killer] = 1,'1 hit using ', InttoStr(Hits[Victim][Killer]) + ' hits using ') + Weapon, $FF000000);
    WriteConsole(Victim, 'You hurt him using ' + iif(Hits[Killer][Victim] = 1, '1 hit doing ', InttoStr(Hits[Killer][Victim]) + ' hits doing ') + iif(Realistic, InttoStr(Round(1.54 * Dmg[Killer][Victim])), InttoStr(Dmg[Killer][Victim])) + '% damage', $FF000000);
    for i := 1 to 32 do begin
      Hits[Victim][i] := 0;
      Dmg[Victim][i] := 0;
    end;
  end;
end;

function OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;
begin
  Result := Damage;
  Hits[Victim][Shooter] := Hits[Victim][Shooter] + 1;
  if Damage <= GetPlayerStat(Victim,'Health') then Dmg[Victim][Shooter] := Dmg[Victim][Shooter] + Damage else Dmg[Victim][Shooter] := Dmg[Victim][Shooter] + GetPlayerStat(Victim,'Health');
end;

procedure OnPlayerRespawn(ID: byte);
var
  i: byte;
begin
  for i:= 1 to 32 do begin
    Dmg[i][ID] := 0;
    Hits[i][ID] := 0;
  end;
end;

Offline Miszkol_

  • Major(1)
  • Posts: 30
  • The Piccolo Power xD
Re: Death Information
« Reply #25 on: April 23, 2008, 03:15:45 am »
Thx it's better but i see bugs:
- Whan some1 kill some1 with usscom on screen write "selfkill"...
- Can you do some1 write commend "/me" or "/deadinfo" to look dead info
- please change color massage black to red

(I can't write script :'()

English is hard language, please forget my bad :P

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Death Information
« Reply #26 on: April 23, 2008, 02:48:32 pm »
- Whan some1 kill some1 with usscom on screen write "selfkill"...
soldat server seems to give inaccurate info about who kills who with what when it comes to the ussocom :P I can add a manual check to replace "Selfkill" with "USSOCOM" though

- Can you do some1 write commend "/me" or "/deadinfo" to look dead info
How would this work exactly? If player A kills player B, then when player B does /deadinfo, it regives him the info of the last player who killed him (player A)?

Offline Miszkol_

  • Major(1)
  • Posts: 30
  • The Piccolo Power xD
Re: Death Information
« Reply #27 on: April 24, 2008, 07:43:52 am »
- Whan some1 kill some1 with usscom on screen write "selfkill"...
soldat server seems to give inaccurate info about who kills who with what when it comes to the ussocom :P I can add a manual check to replace "Selfkill" with "USSOCOM" though

- Can you do some1 write commend "/me" or "/deadinfo" to look dead info
How would this work exactly? If player A kills player B, then when player B does /deadinfo, it regives him the info of the last player who killed him (player A)?

Yes.
When I write command /deadinfo i want description of my dead AND ONLY IF I WRITE IT, because on my server is more massages(when i win money[cs script] and more more others massages...)
Can you do this script description of ALL people which I shooting ?? Example:
You Give:
- 1 bullet of Desert eagle and 30% hp  to xXx
- 3 bullets of Ak-74 and 110% hp to yYy and Dead

You take:
-  1 bullet of berret and 200% hp and Dead ^^

Can you do it??
« Last Edit: April 24, 2008, 03:28:23 pm by Miszkol_ »
English is hard language, please forget my bad :P

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Death Information
« Reply #28 on: April 24, 2008, 08:14:56 pm »
- Whan some1 kill some1 with usscom on screen write "selfkill"...
soldat server seems to give inaccurate info about who kills who with what when it comes to the ussocom :P I can add a manual check to replace "Selfkill" with "USSOCOM" though

- Can you do some1 write commend "/me" or "/deadinfo" to look dead info
How would this work exactly? If player A kills player B, then when player B does /deadinfo, it regives him the info of the last player who killed him (player A)?

Yes.
When I write command /deadinfo i want description of my dead AND ONLY IF I WRITE IT, because on my server is more massages(when i win money[cs script] and more more others massages...)
Can you do this script description of ALL people which I shooting ?? Example:
You Give:
- 1 bullet of Desert eagle and 30% hp  to xXx
- 3 bullets of Ak-74 and 110% hp to yYy and Dead

You take:
-  1 bullet of berret and 200% hp and Dead ^^

Can you do it??

Would probably be smarter for me to just remake the script...
I can't do it now, and won't be able to start until at least saturday night fyi...

Offline Miszkol_

  • Major(1)
  • Posts: 30
  • The Piccolo Power xD
Re: Death Information
« Reply #29 on: April 25, 2008, 02:05:18 am »
OK i wait to saturdey's night for this script.
English is hard language, please forget my bad :P

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Death Information
« Reply #30 on: April 27, 2008, 11:31:38 am »
OK i wait to saturdey's night for this script.
sunday* I fell asleep as early as 8:30 PM and woke up around noon ^^
How do you want it to work? Should it act like a log? Or should it accumulate per person? (log-like may be long, and spam-like; i wouldn't suggest that) Resetting after you respawn, or only on map change?

Offline Miszkol_

  • Major(1)
  • Posts: 30
  • The Piccolo Power xD
Re: Death Information
« Reply #31 on: April 27, 2008, 01:21:47 pm »
OK i wait for this...
I want :
- When I WANT(no when i dead) see my "shooting Information" I write command :
 
  • /shootinfo - to see my shooting with ALL to i shooting on NOW round and LAST round. If you are dead, script display info about round before dead. Example:


Now Round:
 You given damage:
 - Father - 1 shot, M72 LAW, 200% hp, Dead.

 You taken damage:
 - Major - 1 shot, berret M82A1, 100% hp, Dead.

Reset this info after next round start.

 
  • /shootinfoall - to see shooting info for all rounds. Script display this too on end map or change.  Example:


 All Round :
 You given Damage:
 - Mother - 30 shots ; Weapons: Berret M82A1, AK-74 ; 666% hp, 7 Deads.

 You taken damage:
 - Major - 8 shot ; Weapons: Berret M82A1 ; 800% hp; 8 Deads.

Don't resetting this to change map.
------------------------------------------------
You understand??
Can you do it??
How long i must wait for this??

BB.

       
English is hard language, please forget my bad :P

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Death Information
« Reply #32 on: April 27, 2008, 08:28:18 pm »
Miszkol_: http://forums.soldat.pl/index.php?topic=26689
Make sure you download the survival version.
Commands are /report and /overall

Offline Mushroom

  • Major(1)
  • Posts: 3
Re: Death Information
« Reply #33 on: April 29, 2008, 04:57:50 pm »
Hey, i hope you can help me with this mistake:
Code: [Select]
[*] Compiling DeathInfo -> core.pas...
 [*] DeathInfo -> [Error] (15:92): String error
 [*] DeathInfo -> [Error] (15:92): Syntax error

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Death Information
« Reply #34 on: May 02, 2008, 04:31:30 pm »
Hey, i hope you can help me with this mistake:
Code: [Select]
[*] Compiling DeathInfo -> core.pas...
 [*] DeathInfo -> [Error] (15:92): String error
 [*] DeathInfo -> [Error] (15:92): Syntax error
I zipped the original script, so try just extracting that into your scripts folder.

Offline Zhul

  • Major(1)
  • Posts: 17
Re: Death Information
« Reply #35 on: May 03, 2008, 04:18:09 am »
it doesnt show with witch weapon you hit the guy that kills you :(

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Death Information
« Reply #36 on: May 03, 2008, 08:18:06 am »
it doesnt show with witch weapon you hit the guy that kills you :(
Oh, no; you know what weapon you hit them with so no need for that :P
Unless you have an extremely poor memory and can't remember literally 1 second ago when you were alive what weapon you had ^^

Offline Mushroom

  • Major(1)
  • Posts: 3
Re: Death Information
« Reply #37 on: May 03, 2008, 01:33:09 pm »
Thank you, now it works :D

EDIT: How can I change the text color ?
« Last Edit: May 03, 2008, 01:47:36 pm by Mushroom »

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Death Information
« Reply #38 on: May 03, 2008, 09:30:41 pm »
Thank you, now it works :D

EDIT: How can I change the text color ?
You have to know a little bit about hex and how colors work in hex...
find "$FF000000" in the script...
if you don't know anthing about hex, then google hexadecimal colors or something like that
you will notice that you will get 6 length hex number... put a $ the the left of it, and replace the old one with the new one

Offline Mushroom

  • Major(1)
  • Posts: 3
Re: Death Information
« Reply #39 on: May 04, 2008, 05:57:24 am »
OK thank you it works but i think the font is not so good. Its hard to read. Is there an possibility to change the font ?