Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1.  
  2. //#CLIENTSIDE
  3.  
  4. if (actionclientside){
  5. if (strequals(#L,levelname.nw)){
  6. if (!strequals(#g,Player)){
  7. if (!client.safe){
  8. triggeraction 0,0,serverside,-Movement,#a;
  9. }
  10. }
  11. }
  12. }
  13.  
  14. if (created) {
  15. timeout=0.05;
  16. this.on=0;
  17. setstring client.strafe,off;
  18. }
  19.  
  20.  
  21.  
  22. if (keypressed&&keydown2(keycode(1),true)) {
  23.  
  24. if (strequals(#s(client.strafe),off)) {
  25. this.strafe=playerdir;
  26. if (playerdir==0) {
  27. setstring client.strdir,0;
  28. }
  29. if (playerdir==1) {
  30. setstring client.strdir,1;
  31. }
  32. if (playerdir==2) {
  33. setstring client.strdir,2;
  34. }
  35. if (playerdir==3) {
  36. setstring client.strdir,3;
  37. }
  38. setstring client.strafe,on;
  39. this.on=1;
  40. } else
  41. if (strequals(#s(client.strafe),on)) {
  42. setstring client.strafe,off;
  43. this.on=0;
  44. }
  45.  
  46. }
  47.  
  48.  
  49. if (timeout) {
  50. if (keydown(0)){
  51. if (this.on==1) {
  52. playerdir=this.strafe;
  53. }
  54. }
  55. if (keydown(1)){
  56. if (this.on==1) {
  57. playerdir=this.strafe;
  58. }
  59. }
  60. if (keydown(2)){
  61. if (this.on==1) {
  62. playerdir=this.strafe;
  63. }
  64. }
  65. if (keydown(3)){
  66. if (this.on==1) {
  67. playerdir=this.strafe;
  68. }
  69. }
  70. timeout=0.05;
  71. }
  72.  
  73.  
  74. if (timeout) {
  75. if (keydown(0)){
  76. playerdir = 0;
  77. playery-=0.5;
  78. setani walk,;
  79. }
  80. if (keydown(1)){
  81. playerdir = 1;
  82. playerx-=0.5;
  83. setani walk,;
  84. }
  85. if (keydown(2)){
  86. playerdir = 2;
  87. playery+=0.5;
  88. setani walk,;
  89. timeout=0.05;
  90. }
  91. if (keydown(3)){
  92. playerdir = 3;
  93. playerx+=0.5;
  94. setani walk,;
  95. }
  96. timeout=0.05;
  97. if (onwall(playerx+0.5,playery+1.5)) {playerx+=0.5}
  98. if (onwall(playerx+0.5,playery+2)){playerx+=0.5}
  99. if (onwall(playerx+2,playery+1.5)) {playerx-=0.5}
  100. if (onwall(playerx+2,playery+2)) {playerx-=0.5}
  101. if (onwall(playerx+0.5,playery+2.5)) {playery-=0.5}
  102. if (onwall(playerx+1,playery+2.5)) {playery-=0.5}
  103. if (onwall(playerx+1.5,playery+2.5)) {playery-=0.5}
  104. if (onwall(playerx+0.5,playery+1)) {playery+=0.5}
  105. if (onwall(playerx+1,playery+1)) {playery+=0.5}
  106. if (onwall(playerx+1.5,playery+1)) {playery+=0.5}
  107. }
  108.  
  109. for (i=0; i<4; i++) {
  110. if (keydown(i)) {
  111. setani walkslow,;
  112. break;
  113. } else
  114. setani idle,;
  115. }
  116. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement