Author Topic: Request mini script  (Read 815 times)

0 Members and 1 Guest are viewing this topic.

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 557
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Request mini script
« on: February 21, 2010, 03:51:06 pm »
i want when i hit a player that say ID and how many life stay to him
a Draw Text if is possible ^^

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Re: Request mini script
« Reply #1 on: February 21, 2010, 04:30:49 pm »
Code: [Select]
function onplayerdamage(victim, shooter: byte; damage: integer): integer;
  begin
    drawtext(shooter, 'ID: ' + inttostr(victim) + ' | HP: ' + inttostr(getplayerstat(victim, 'health') - damage), 330, RGB(255,255,255), 0.20, 100, 240);
    result := damage;
  end;

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 557
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: Request mini script
« Reply #2 on: February 21, 2010, 04:53:19 pm »
ty man that's work

From: February 21, 2010, 05:08:12 pm
that work but the message is too big and the text say ID i want that say the ID of the guys i attack
   

From: February 21, 2010, 05:11:42 pm
that can be like my screen ?
« Last Edit: February 21, 2010, 05:11:42 pm by mich1103 »

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Re: Request mini script
« Reply #3 on: February 21, 2010, 06:10:28 pm »
You can't draw additional text using DrawText on current version of SoldatServer. The upcoming one supports up to three or four separate layers for big texts, so my DrawText would 'cover' these of iMod.

And I don't understand what is wrong... You wanted ID, so it displays ID. Dod you want it to display nick of the player you're attacking? If so, then use this code:
Code: [Select]
function onplayerdamage(victim, shooter: byte; damage: integer): integer;
  begin
    drawtext(shooter, idtoname(victim) + ' | HP: ' + inttostr(getplayerstat(victim, 'health') - damage), 330, RGB(255,255,255), 0.12, 100, 240);
    result := damage;
  end;
You can change the size by modifying the 0.12 part.

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 557
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: Request mini script
« Reply #4 on: February 21, 2010, 06:53:34 pm »
yes i want the nick of the player

Offline dominikkk26

  • Camper
  • ***
  • Posts: 404
    • PMGsite
Re: Request mini script
« Reply #5 on: February 22, 2010, 08:49:40 am »
How well do you know how to set the coordinates in drawText
Please some guide!

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Request mini script
« Reply #6 on: February 22, 2010, 09:50:16 am »
How well do you know how to set the coordinates in drawText
Please some guide!
Topic hijack. Just make a simple script to display some text on screen and test coordinates.

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: Request mini script
« Reply #7 on: February 22, 2010, 10:33:42 am »