Removed PlayerSpawnn_TimerGive timer callback and moved the code to OnPlayerSpawn event.
Zeus check in spawn event now utilizes PlayerManager's class HasWeapon function.
Fixed SetStateChanged to update player's money.`
PlayerManager class
Added two functions:
public static bool HasWeapon(CCSPlayerController player, string weaponName) and
public static bool HasWeapon(CCSPlayerPawn playerPawn, string weaponName)
Updated public static void GiveItem(CCSPlayerController player, CsItem item, int count = 1) to automatically extract the weapon name as a string from CsItem and call public static void GiveItem(CCSPlayerController player, string item, int count = 1).
PlayerSpawnn_TimerGive
timer callback and moved the code toOnPlayerSpawn
event.HasWeapon
function.SetStateChanged
to update player's money.`public static bool HasWeapon(CCSPlayerController player, string weaponName)
andpublic static bool HasWeapon(CCSPlayerPawn playerPawn, string weaponName)
public static void GiveItem(CCSPlayerController player, CsItem item, int count = 1)
to automatically extract the weapon name as a string from CsItem and callpublic static void GiveItem(CCSPlayerController player, string item, int count = 1)
.