Final commit, everything is working :D.
im happy to say this is the first gamemode i have coded and after 18
sessions of thorough testing stretched over 3 hours.
it works!