I want to update the NUI on show

Hey guys,
I want to update a NUI on show.

I use d3x_vehicleshop and added a storage ammount of the vehicle (how many vehicles are avalible to buy).
Now i want to update the number at the NUI if it is shown to the player.
How can i make it?
Can someone help me?

Current source code at:

Sry for my bad english -.-

Problem sloved.
I created a new ServerEvent to clear the Vehicles table an update it with the newer Vehiclesdata from MySQL.