Sign in to follow this  
n4gix

Server gauge updating

Recommended Posts

HI! It's me again ;) ... i created a server gauge, and 2 client gauges . now i would like to know how can i change the values of these variables in server gauges .. here's the codecase PANEL_SERVICE_PRE_INSTALL: { register_var_by_name (&EcamPage, TYPE_UINT32, "EcamPage"); register_var_by_name (&EcamAction, TYPE_UINT32, "EcamAction"); break; } case PANEL_SERVICE_PRE_UPDATE: { EcamPage = 10; break; } case PANEL_SERVICE_PRE_KILL: { unregister_var_by_name ("EcamPage"); unregister_var_by_name ("EcamAction"); break; ..now the EcamPage = 10; does not update the variable value ... can i do this in server gauge, or is this only doable over client gauge?

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

This works:UINT32 EcamPage = 0 ; // server gauge broadcast version of variableUINT32 EcamPage_local =0 ; // server gauge local version of variablevoid FSAPI gaugecall(PGAUGEHDR pgauge, int service_id, UINT32 extra_data){ switch(service_id) { case PANEL_SERVICE_PRE_INSTALL: register_var_by_name(&EcamPage,TYPE_UINT32,"EcamPage"); break; case PANEL_SERVICE_PRE_UPDATE: EcamPage = EcamPage_local ; break; case PANEL_SERVICE_PRE_KILL: unregister_var_by_name("EcamPage"); break; }}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this