Author Topic: + Score script  (Read 616 times)

0 Members and 1 Guest are viewing this topic.

Offline Szewczuq

  • Soldier
  • **
  • Posts: 115
  • WOOH! ROCKS ON MY HEAD!
    • POLISH GAMERS COMMUNITY
+ Score script
« on: December 20, 2007, 05:50:15 pm »
I search script for adding score e.q.:
/add 5 10
Add 5 <<--- numer of player,  10 points <<--- points
Who make this script for me? / or found for me? :)



Offline Kavukamari

  • Camper
  • ***
  • Posts: 435
  • 3.14159265358979, mmm... pi
Re: + Score script
« Reply #1 on: December 20, 2007, 06:17:29 pm »
Code: [Select]
function OnCommand(ID:Byte;Text:string):boolean;
var
  Temp0, Temp1, Temp2: string;
begin
  Result:=false;
  Temp0:=GetPiece(LowerCase(Text), ' ', 0);
  Case Temp0 of
    '/kills','/setkills': begin
      Temp1:=GetPiece(Text, ' ', 1);
      Temp2:=GetPiece(Text, ' ', 2);
      if Active[strtoint(Temp1)] then begin
        if Team[strtoint(Temp1)] < 5 then begin
          try
            SetScore(Temp1,Temp2);
          except
            WriteConsole(ID,'SetScore failed, Unknown exception.',$FFFF8020);
          end;
        end else WriteConsole(ID,'Cannot set kills, Player is Spectator.',$FFFF8020);
      end else WriteConsole(ID,'Cannot set kills, Player is inactive.',$FFFF8020);
    end;
//add more stuff here
  end;
end;

this will set the player's kills

( /kills *playernum* *new kills* )

I used case so you can add more commands if needed
"Be mindful of fame, show a mighty courage, watch against foes. Nor shalt thou lack what thou desirest, if with thy life thou hast comest out from that heroic task."

Offline Szewczuq

  • Soldier
  • **
  • Posts: 115
  • WOOH! ROCKS ON MY HEAD!
    • POLISH GAMERS COMMUNITY
Re: + Score script
« Reply #2 on: December 21, 2007, 05:55:35 am »
sorry but this scirpt not working :/ server shut down :(