Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. // this is the sync function, call when you need things synced in a serverside script
  2. void SyncAllClientsideVariables() {
  3. int i, j;
  4. // sync orbs
  5. for(i = 0; i < MAX_SYNC_VARS; ++i) {
  6. if(i == DND_SYNC_WEAPONENHANCE || (i >= DND_SYNC_WEPBONUS_CRIT && i <= DND_SYNC_WEPBONUS_DMG)) {
  7. for(j = 0; j < MAXWEPS; ++j)
  8. ACS_NamedExecuteAlways("DND Clientside Orb Syncer", 0, i, GetPlayerSyncValue_Orb(i, j), j);
  9. }
  10. else
  11. ACS_NamedExecuteAlways("DND Clientside Orb Syncer", 0, i, GetPlayerSyncValue_Orb(i, 0), 0);
  12. }
  13. }
  14.  
  15. Script "DND Clientside Orb Syncer" (int var, int to, int extra) CLIENTSIDE {
  16. SetSyncValue_Orb(var, to, extra);
  17. }
  18.  
  19. 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