0 Members and 1 Guest are viewing this topic.
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;
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;
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;
health has to be between ''sCode: [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;
Shouldn't it be GetPiece insted of Getpiece?
Quote from: freestyler on June 07, 2009, 05:20:27 amhealth has to be between ''sCode: [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 =(
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;