aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/faction_xp.gnut
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/faction_xp.gnut')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/faction_xp.gnut11
1 files changed, 10 insertions, 1 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/faction_xp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/faction_xp.gnut
index 37b89169..5fd7d101 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/faction_xp.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/faction_xp.gnut
@@ -1 +1,10 @@
-//fuck \ No newline at end of file
+global function AddFactionXP
+
+void function AddFactionXP( entity player, int amount )
+{
+ string faction = GetFactionChoice( player )
+ // increment xp
+ player.SetPersistentVar( "factionXP[" + faction + "]", min( FactionGetXP( player, faction ) + amount, FactionGetMaxXP( faction ) ) )
+
+ // note: no notif for faction level up
+} \ No newline at end of file