Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //#CLIENTSIDE
- function onKeyPressed(keyCode,keyName,scanCode){
- if(keyName == "f"){
- this.lightson = !this.lightson;
- if(this.lightson){
- setTimer(".05");
- }
- else {
- hideimgs(100,103);
- this.spin = 0;
- }
- }
- }
- function onTimeout(){
- if(this.lightson){
- this.spin += .05;
- showimg(100,"light2.png",(player.x-2.55) - sin(this.spin*2) * 2,(player.y-2.5) - cos(this.spin) * 2);
- changeimgcolors(100,sin(this.spin),cos(this.spin),0,.99);
- changeimgzoom(100,.5);
- showimg(101,"light2.png",(player.x-2.55) - sin(this.spin*2) * 2,(player.y-2.5) + cos(this.spin) * 2);
- changeimgcolors(101,cos(this.spin),sin(this.spin),0,.99);
- changeimgzoom(101,.5);
- showimg(102,"light2.png",(player.x-2.55) + sin(this.spin*2) * 2,(player.y-2.5) + cos(this.spin) * 2);
- changeimgcolors(102,sin(this.spin),cos(this.spin),0,.99);
- changeimgzoom(102,.5);
- showimg(103,"light2.png",(player.x-2.55) + sin(this.spin*2) * 2,(player.y-2.5) - cos(this.spin) * 2);
- changeimgcolors(103,cos(this.spin),sin(this.spin),0,.99);
- changeimgzoom(103,.5);
- }
- setTimer(".05");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement