Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. //This updates the client with information from the server.
  2. script 199 (int updateWhat, int index, int value) clientside
  3. {
  4. if(consoleplayernumber() == playernumber())
  5. {
  6. if(updateWhat == statusMoreTurrets)
  7. {
  8. moreTurrets[index] = value;
  9. }
  10. else if(updateWhat == statusAdvTurrets)
  11. {
  12. AdvancedTurrets[index] = value;
  13. }
  14. else if(updateWhat == statusAdvMechs)
  15. {
  16. AdvancedMechResearch[index] = value;
  17. }
  18. else if(updateWhat == statusTeam)
  19. {
  20. clientTeam = value;
  21. }
  22. else if(updateWhat == statusPortals)
  23. {
  24. Portals[index] = value;
  25. }
  26. else if(updateWhat == statusDrones)
  27. {
  28. tiberiumdrones[index] = value;
  29.  
  30. }
  31. else if(updateWHat == statusUpdateBaseHud)
  32. {
  33. valueholdingarray[BaseHUDUpdate] = value;
  34. }
  35. }
  36. }
  37.  
  38.  
  39. //debug script.
  40. /*
  41. script 200 enter clientside
  42. {
  43. if(consoleplayernumber() == playernumber())
  44. {
  45. if(clientTeam == team_red)
  46. log(s:"ur team red");
  47. else
  48. log(s:"ur team blue");
  49.  
  50. log(s:"advanced turret is: ", d:AdvancedTurrets[clientTeam]);
  51. delay(35);
  52. restart;
  53. }
  54. }
  55. */
  56.  
  57. //Server tells client about variables.
  58. function void updateClientInfo(int updateWhat)
  59. {
  60. if(updateWhat == statusResearch)
  61. {
  62. for(int i = 0; i <= 1; i++)
  63. {
  64. acs_executealways(199, 0, statusMoreTurrets, i, moreTurrets[i]);
  65. acs_executealways(199, 0, statusAdvTurrets, i, AdvancedTurrets[i]);
  66. acs_executealways(199, 0, statusAdvMechs, i, AdvancedMechResearch[i]);
  67. }
  68. }
  69. else if(updateWhat == statusTeam)
  70. {
  71. acs_executealways(199, 0, statusTeam, 0, playerteam());
  72. }
  73. else if(updateWhat == statusPortals)
  74. {
  75. acs_executealways(199, 0, statusPortals, 0, portals[0]);
  76. acs_executealways(199, 0, statusPortals, 1, portals[1]);
  77. }
  78. else if(updateWhat == statusDrones)
  79. {
  80. acs_executealways(199, 0, statusDrones, playernumber(), tiberiumdrones[playernumber()]);
  81. }
  82.  
  83. else if(updateWhat == statusUpdateBaseHud)
  84. {
  85. acs_executealways(199, 0, statusUpdateBaseHud, 0, 1);
  86. }
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement