Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. //#CLIENTSIDE
  2.  
  3. function onKeyPressed(keyCode,keyName,scanCode){
  4. if(keyName == "f"){
  5. this.lightson = !this.lightson;
  6. if(this.lightson){
  7. setTimer(".05");
  8. }
  9. else {
  10. hideimgs(100,103);
  11. this.spin = 0;
  12. }
  13. }
  14. }
  15. function onTimeout(){
  16. if(this.lightson){
  17. this.spin += .05;
  18. showimg(100,"light2.png",(player.x-2.55) - sin(this.spin*2) * 2,(player.y-2.5) - cos(this.spin) * 2);
  19. changeimgcolors(100,sin(this.spin),cos(this.spin),0,.99);
  20. changeimgzoom(100,.5);
  21. showimg(101,"light2.png",(player.x-2.55) - sin(this.spin*2) * 2,(player.y-2.5) + cos(this.spin) * 2);
  22. changeimgcolors(101,cos(this.spin),sin(this.spin),0,.99);
  23. changeimgzoom(101,.5);
  24. showimg(102,"light2.png",(player.x-2.55) + sin(this.spin*2) * 2,(player.y-2.5) + cos(this.spin) * 2);
  25. changeimgcolors(102,sin(this.spin),cos(this.spin),0,.99);
  26. changeimgzoom(102,.5);
  27. showimg(103,"light2.png",(player.x-2.55) + sin(this.spin*2) * 2,(player.y-2.5) - cos(this.spin) * 2);
  28. changeimgcolors(103,cos(this.spin),sin(this.spin),0,.99);
  29. changeimgzoom(103,.5);
  30. }
  31. setTimer(".05");
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement