<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.soldat.pl/index.php?action=history&amp;feed=atom&amp;title=Simple_Exp</id>
		<title>Simple Exp - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.soldat.pl/index.php?action=history&amp;feed=atom&amp;title=Simple_Exp"/>
		<link rel="alternate" type="text/html" href="https://wiki.soldat.pl/index.php?title=Simple_Exp&amp;action=history"/>
		<updated>2026-05-26T01:27:29Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.soldat.pl/index.php?title=Simple_Exp&amp;diff=37&amp;oldid=prev</id>
		<title>Freeman: Created page with &quot;===Script by Spkka=== &lt;source lang=&quot;pascal&quot;&gt;const 	MAXPLAYER = 16;  var 	playerExp: array [1..MAXPLAYER] of integer; 	playerLev: array [1..MAXPLAYER] of integer; 	GOOD, BAD: l...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.soldat.pl/index.php?title=Simple_Exp&amp;diff=37&amp;oldid=prev"/>
				<updated>2012-08-14T16:48:19Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;===Script by Spkka=== &amp;lt;source lang=&amp;quot;pascal&amp;quot;&amp;gt;const 	MAXPLAYER = 16;  var 	playerExp: array [1..MAXPLAYER] of integer; 	playerLev: array [1..MAXPLAYER] of integer; 	GOOD, BAD: l...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;===Script by Spkka===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;pascal&amp;quot;&amp;gt;const&lt;br /&gt;
	MAXPLAYER = 16;&lt;br /&gt;
&lt;br /&gt;
var&lt;br /&gt;
	playerExp: array [1..MAXPLAYER] of integer;&lt;br /&gt;
	playerLev: array [1..MAXPLAYER] of integer;&lt;br /&gt;
	GOOD, BAD: longint;&lt;br /&gt;
&lt;br /&gt;
procedure ActivateServer();&lt;br /&gt;
begin&lt;br /&gt;
	//color of writeconsole messages&lt;br /&gt;
	GOOD := $EE00FF00;&lt;br /&gt;
	BAD := $FFFF4444;&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
procedure OnMapChange(NewMap: string);&lt;br /&gt;
var&lt;br /&gt;
	i: byte;&lt;br /&gt;
begin&lt;br /&gt;
	//reset scores for all players onmapchange&lt;br /&gt;
	for i := 1 to MAXPLAYER do&lt;br /&gt;
	begin&lt;br /&gt;
		playerExp[i] := 0;&lt;br /&gt;
		playerLev[i] := 1;&lt;br /&gt;
	end&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
procedure OnJoinTeam(ID, Team: byte);&lt;br /&gt;
begin&lt;br /&gt;
	//reset score player joining&lt;br /&gt;
	playerExp[ID] := 0;&lt;br /&gt;
	playerLev[ID] := 1;&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
procedure OnLeaveGame(ID, Team: byte; Kicked: boolean);&lt;br /&gt;
begin&lt;br /&gt;
	//reset score player leaving&lt;br /&gt;
	playerExp[ID] := 0;&lt;br /&gt;
	playerLev[ID] := 1;&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
function OnPlayerCommand(ID: Byte; Text: string): boolean;&lt;br /&gt;
begin&lt;br /&gt;
	//command to check your current level&lt;br /&gt;
	if (Copy(Text,1,7) = '/level') then &lt;br /&gt;
	begin&lt;br /&gt;
		WriteConsole(ID, 'You got '+ inttostr(playerExp[ID]) + ' Exp',GOOD);&lt;br /&gt;
		WriteConsole(ID, 'You are now Level: '+ inttostr(playerLev[ID]),GOOD);&lt;br /&gt;
	end&lt;br /&gt;
  Result := false;&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
Procedure checkPlayerlev(Killer: byte);&lt;br /&gt;
begin&lt;br /&gt;
	//check how player Exp to level&lt;br /&gt;
	//add more if you want more levels etc&lt;br /&gt;
	if (playerExp[Killer] &amp;gt; 800) and (playerLev[Killer] = 6) then&lt;br /&gt;
	begin&lt;br /&gt;
		WriteConsole(Killer,'You are now Level 7!',GOOD);&lt;br /&gt;
		WriteConsole(0,getPlayerStat(Killer, 'Name') + ' is now Level 7!',GOOD);&lt;br /&gt;
		playerLev[Killer] := 7;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if (playerExp[Killer] &amp;gt; 400) and (playerLev[Killer] = 5) then&lt;br /&gt;
	begin&lt;br /&gt;
		WriteConsole(Killer,'You are now Level 6!',GOOD);&lt;br /&gt;
		WriteConsole(0,getPlayerStat(Killer, 'Name') + ' is now Level 6!',GOOD);&lt;br /&gt;
		playerLev[Killer] := 6;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if (playerExp[Killer] &amp;gt; 200) and (playerLev[Killer] = 4) then&lt;br /&gt;
	begin&lt;br /&gt;
		WriteConsole(Killer,'You are now Level 5!',GOOD);&lt;br /&gt;
		WriteConsole(0,getPlayerStat(Killer, 'Name') + ' is now Level 5!',GOOD);&lt;br /&gt;
		playerLev[Killer] := 5;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if (playerExp[Killer] &amp;gt; 100) and (playerLev[Killer] = 3) then&lt;br /&gt;
	begin&lt;br /&gt;
		WriteConsole(Killer,'You are now Level 4!',GOOD);&lt;br /&gt;
		WriteConsole(0,getPlayerStat(Killer, 'Name') + ' is now Level 4!',GOOD);&lt;br /&gt;
		playerLev[Killer] := 4;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if (playerExp[Killer] &amp;gt; 50) and (playerLev[Killer] = 2) then&lt;br /&gt;
	begin&lt;br /&gt;
		WriteConsole(Killer,'You are now Level 3!',GOOD);&lt;br /&gt;
		WriteConsole(0,getPlayerStat(Killer, 'Name') + ' is now Level 3!',GOOD);&lt;br /&gt;
		playerLev[Killer] := 3;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if (playerExp[Killer] &amp;gt; 25) and (playerLev[Killer] = 1) then&lt;br /&gt;
	begin&lt;br /&gt;
		WriteConsole(Killer,'You are now Level 2!',GOOD);&lt;br /&gt;
		WriteConsole(0,getPlayerStat(Killer, 'Name') + ' is now Level 2!',GOOD);&lt;br /&gt;
		playerLev[Killer] := 2;&lt;br /&gt;
	end&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);&lt;br /&gt;
begin&lt;br /&gt;
	//set score killer and victim&lt;br /&gt;
	//change if you want to give the killer/victim more/less points per kill&lt;br /&gt;
	if Victim &amp;lt;&amp;gt; Killer then&lt;br /&gt;
	begin&lt;br /&gt;
		if getPlayerStat(Killer, 'Active') = true then&lt;br /&gt;
		begin&lt;br /&gt;
			playerExp[Killer] := playerExp[Killer] + 5;&lt;br /&gt;
			checkPlayerlev(Killer);&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if getPlayerStat(Victim, 'Active') = true then&lt;br /&gt;
		begin&lt;br /&gt;
			playerExp[Victim] := playerExp[Victim] - 5;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	//set score suicide&lt;br /&gt;
	if killer = Victim then&lt;br /&gt;
	begin&lt;br /&gt;
		if getPlayerStat(Killer, 'Active') = true then&lt;br /&gt;
		begin&lt;br /&gt;
			playerExp[Killer] := playerExp[Killer] - 5;&lt;br /&gt;
			checkPlayerlev(Killer);&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Templates]]&lt;/div&gt;</summary>
		<author><name>Freeman</name></author>	</entry>

	</feed>