Advertisement
TerminusEst13

surprise shit breaks

Apr 2nd, 2014
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1.  
  2.  
  3. function int MetroidClientVars(void)
  4. {
  5. int doomHealth = !!GetCVar("metroid_cl_doomhealth");
  6. int runrunruu = !!GetCVar("cl_run");
  7.  
  8. return (doomHealth << 1) + runrunruu;
  9. }
  10.  
  11.  
  12.  
  13. script METROID_ENTER ENTER
  14. {
  15. [SNIP SNIP IRRELEVANT SHIT]
  16.  
  17. while (1)
  18. {
  19. [SNIP SNIP SNIP]
  20.  
  21. // Clientside shit
  22. if (array_doomHealth[pln]) { GiveInventory("DoomHealthCounter", 1); }
  23. else { TakeInventory("DoomHealthCounter", 0x7FFFFFFF); }
  24.  
  25. if (array_runrunruu[pln]) { GiveInventory("AlwaysRunIsOn", 1); }
  26. else { TakeInventory("AlwaysRunIsOn", 0x7FFFFFFF); }
  27.  
  28. [ALL THE SNIP]
  29.  
  30. delay(1);
  31. }
  32. }
  33.  
  34.  
  35.  
  36. script METROID_ENTER_CLIENTSIDE ENTER clientside
  37. {
  38. int execInt, oExecInt, execStr;
  39. int pln = PlayerNumber();
  40.  
  41. while(1)
  42. {
  43. oExecInt = execInt;
  44. execInt = MetroidClientVars();
  45.  
  46. if (execInt != oExecInt)
  47. {
  48. execStr = StrParam(s:"puke -", d:METROID_PUKE, s:" ", d:execInt, s:" ", d:pln);
  49. ConsoleCommand(execStr);
  50. }
  51.  
  52. delay(1);
  53. }
  54. }
  55.  
  56.  
  57.  
  58. script METROID_PUKE (int values, int pln) net
  59. {
  60. array_runrunruu[pln] = values & 1;
  61. array_doomHealth[pln] = values & 2;
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement