Author Topic: Ginfo Script  (Read 1177 times)

0 Members and 1 Guest are viewing this topic.

Offline Google [Bot]

  • Major(1)
  • Posts: 18
Ginfo Script
« on: June 06, 2009, 12:58:29 pm »
i'm write this script and so has a problem  :P
Here

Code: [Select]
procedure OnPlayerSpeak(ID: byte; Text: string);
begin

    if (GetPiece(Text, ' ',0) = '!ginfo') then begin
    WriteConsole(0,'IDToName(GetPiece(Text, ' ',1)health is '+IDToName(GetPlayerStat' + GetPiece(Text, ' ',2)','health)',RGB,(255,255,0));

end;
Where is problem ?
« Last Edit: June 06, 2009, 01:01:28 pm by Google [Bot] »

Offline tk

  • Soldier
  • **
  • Posts: 235
Re: Ginfo Script
« Reply #1 on: June 06, 2009, 01:46:03 pm »
remove begin in the 4th line.

edit
The whole 2nd parameter in WriteConsole is fecked and you mustn't put comma between
RGB and (255,255,0) in the thrid.
« Last Edit: June 06, 2009, 01:51:31 pm by tk »

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
Re: Ginfo Script
« Reply #2 on: June 06, 2009, 06:57:07 pm »

Quote
procedure OnPlayerSpeak(ID: byte; Text: string);
begin

    if GetPiece(Text, ' ',0) = '!ginfo' then begin
    WriteConsole(0,IDToName(GetPiece(Text, ' ',1))+ ' health is '+inttostr(GetPlayerStat(Getpiece(Text,' ',1), health)), $FFFF00);
    end;

end;
Also Known As REIMA


Lol Happles (happy apples)

Offline Google [Bot]

  • Major(1)
  • Posts: 18
Re: Ginfo Script
« Reply #3 on: June 07, 2009, 04:22:20 am »
oh i'm used IDtoName 2 times xD
Thanks.
edit:not works :(
« Last Edit: June 07, 2009, 04:24:01 am by Google [Bot] »

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Re: Ginfo Script
« Reply #4 on: June 07, 2009, 05:20:27 am »
health has to be between ''s

Code: [Select]
procedure OnPlayerSpeak(ID: byte; Text: string);
begin

    if GetPiece(Text, ' ',0) = '!ginfo' then begin
    WriteConsole(0,IDToName(GetPiece(Text, ' ',1))+ ' health is '+inttostr(GetPlayerStat(Getpiece(Text,' ',1), 'health')), $FFFFFF00);
    end;

end;

@low: right, forgot about strtoint :x
« Last Edit: June 07, 2009, 11:07:07 am by freestyler »

Offline Google [Bot]

  • Major(1)
  • Posts: 18
Re: Ginfo Script
« Reply #5 on: June 07, 2009, 09:15:26 am »
health has to be between ''s

Code: [Select]
procedure OnPlayerSpeak(ID: byte; Text: string);
begin

    if GetPiece(Text, ' ',0) = '!ginfo' then begin
    WriteConsole(0,IDToName(GetPiece(Text, ' ',1))+ ' health is '+inttostr(GetPlayerStat(Getpiece(Text,' ',1), 'health')), $FFFFFF00);
    end;

end;
Failed...
Where is problem i just crazy =(

Offline Snack

  • Soldier
  • **
  • Posts: 115
  • Ehm ;_;
Re: Ginfo Script
« Reply #6 on: June 07, 2009, 10:13:55 am »
Shouldn't it be GetPiece insted of Getpiece?

Offline CurryWurst

  • Camper
  • ***
  • Posts: 265
    • Soldat Global Account System
Re: Ginfo Script
« Reply #7 on: June 07, 2009, 11:05:29 am »
Shouldn't it be GetPiece insted of Getpiece?

Doesn't matter. Pascal is case insensitive.

health has to be between ''s

Code: [Select]
procedure OnPlayerSpeak(ID: byte; Text: string);
begin

    if GetPiece(Text, ' ',0) = '!ginfo' then begin
    WriteConsole(0,IDToName(GetPiece(Text, ' ',1))+ ' health is '+inttostr(GetPlayerStat(Getpiece(Text,' ',1), 'health')), $FFFFFF00);
    end;

end;
Failed...
Where is problem i just crazy =(

You may try this...
Code: [Select]
procedure OnPlayerSpeak(ID: byte; Text: string);
begin
    if GetPiece(Text, ' ',0) = '!ginfo' then
    begin
      WriteConsole(0, IDToName(StrToInt(GetPiece(Text, ' ',1)))+ ' health is '+IntToStr(GetPlayerStat(StrToInt(Getpiece(Text,' ',1)), 'health')), $FFFFFF00);
    end;
end;
Soldat Global Account System: #soldat.sgas @ quakenet

Offline Google [Bot]

  • Major(1)
  • Posts: 18
Re: Ginfo Script
« Reply #8 on: June 07, 2009, 12:01:27 pm »
Works Thanks CurryWurst!