Pointshop Refresh + End of round hooks

I have pointshop on TTT and it is using PData, I noticed that it doesn’t refresh your points untill a map change. So if you have 2000 points and spent 1500 it still says you have 2000 untill the next map.

I tried to do something like this but it didn’t seem to work.


 
hook.Add( "TTTPrepareRound", "pointshop_refresh_player_points", function()

	for k, v in pairs( player.GetAll() ) do

		if IsValid( v ) then

			v:PS_LoadData()

		end

	end

end)
 

Now the second thing I have here is end of round hooks, Im trying to support a few gamemodes with the addon I’m creating but im failing to find the end of round hooks with results like TTT.

Im looking for Jailbreak 7 By Excel, Murder, Prophunt and Hide and seek. Does anyone know them? Also I already found the hooks for TTT and Deathrun.

Like this /



	hook.Add( "TTTEndRound", "TTT_ENDOFROUND", function( winType )

		if winType == WIN_TRAITOR then
		
		elseif winType == WIN_INNOCENT then

		elseif winType == WIN_TIMELIMIT then


	end)


What you described about 2000 points staying like that isn’t normal. Have you tested this with a clean server?

:snip:
Misunderstood

“Im looking for Jailbreak 7 By Excel, Murder, Prophunt and Hide and seek. Does anyone know them? Also I already found the hooks for TTT and Deathrun.”

I already have TTT and Deathrun as the creators are capable of documenting their gamemode. Im looking for the others.

Hmm, seems alright. Try this:


 
hook.Add( "TTTPrepareRound", "pointshop_refresh_player_points", pointshopRefreshTTT )

        local function pointshopRefreshTTT()
	for k, v in pairs( player.GetAll() ) do
			v:PS_LoadData()

		end

	end
pointshopRefreshTTT()


I think that should work, and it has to be in the Pointshop folder to get best output.
Hope it works! ~ Jacob