Official Soldat Forums
Server Talk => Scripting Discussions and Help => Topic started by: Szewczuq 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? :)
-
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
-
sorry but this scirpt not working :/ server shut down :(