Advertisement
metario

reloadColorset

Aug 28th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.69 KB | None | 0 0
  1. function reloadColorset()
  2.   {
  3.     //make torque recognize the changes you made
  4.     setModPaths(getModPaths());
  5.     //set the colors
  6.     setSprayCanColors();
  7.     for(%i=0;%i<clientgroup.getCount();%i++)
  8.     {
  9.       %b = clientgroup.getobject(%i);
  10.       //hacky way of checking if they passed stage 3
  11.       //this is not required if they have not passed stage 3
  12.       //the client will do it at stage 3
  13.       if(%b.hasSpawnedOnce)
  14.       {
  15.         //thanks port
  16.         //transmit data about blocks
  17.         //then reload the paint gui on client side
  18.         %b.transmitStaticBrickData();
  19.           commandToClient(%b, 'PlayGUI_LoadPaint');
  20.       }
  21.   }
  22.       talk("Reloaded colorset.");
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement