Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // this is the sync function, call when you need things synced in a serverside script
- void SyncAllClientsideVariables() {
- int i, j;
- // sync orbs
- for(i = 0; i < MAX_SYNC_VARS; ++i) {
- if(i == DND_SYNC_WEAPONENHANCE || (i >= DND_SYNC_WEPBONUS_CRIT && i <= DND_SYNC_WEPBONUS_DMG)) {
- for(j = 0; j < MAXWEPS; ++j)
- ACS_NamedExecuteAlways("DND Clientside Orb Syncer", 0, i, GetPlayerSyncValue_Orb(i, j), j);
- }
- else
- ACS_NamedExecuteAlways("DND Clientside Orb Syncer", 0, i, GetPlayerSyncValue_Orb(i, 0), 0);
- }
- }
- Script "DND Clientside Orb Syncer" (int var, int to, int extra) CLIENTSIDE {
- SetSyncValue_Orb(var, to, extra);
- }
- in SetSyncValue_Orb function, you just update your variables ith index to your desired value. You need to send 2 inputs to the function, the player number and value, like above. Only in the above I send 3 things instead.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement