Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //#CLIENTSIDE
- if (actionclientside){
- if (strequals(#L,levelname.nw)){
- if (!strequals(#g,Player)){
- if (!client.safe){
- triggeraction 0,0,serverside,-Movement,#a;
- }
- }
- }
- }
- if (created) {
- timeout=0.05;
- this.on=0;
- setstring client.strafe,off;
- }
- if (keypressed&&keydown2(keycode(1),true)) {
- if (strequals(#s(client.strafe),off)) {
- this.strafe=playerdir;
- if (playerdir==0) {
- setstring client.strdir,0;
- }
- if (playerdir==1) {
- setstring client.strdir,1;
- }
- if (playerdir==2) {
- setstring client.strdir,2;
- }
- if (playerdir==3) {
- setstring client.strdir,3;
- }
- setstring client.strafe,on;
- this.on=1;
- } else
- if (strequals(#s(client.strafe),on)) {
- setstring client.strafe,off;
- this.on=0;
- }
- }
- if (timeout) {
- if (keydown(0)){
- if (this.on==1) {
- playerdir=this.strafe;
- }
- }
- if (keydown(1)){
- if (this.on==1) {
- playerdir=this.strafe;
- }
- }
- if (keydown(2)){
- if (this.on==1) {
- playerdir=this.strafe;
- }
- }
- if (keydown(3)){
- if (this.on==1) {
- playerdir=this.strafe;
- }
- }
- timeout=0.05;
- }
- if (timeout) {
- if (keydown(0)){
- playerdir = 0;
- playery-=0.5;
- setani walk,;
- }
- if (keydown(1)){
- playerdir = 1;
- playerx-=0.5;
- setani walk,;
- }
- if (keydown(2)){
- playerdir = 2;
- playery+=0.5;
- setani walk,;
- timeout=0.05;
- }
- if (keydown(3)){
- playerdir = 3;
- playerx+=0.5;
- setani walk,;
- }
- timeout=0.05;
- if (onwall(playerx+0.5,playery+1.5)) {playerx+=0.5}
- if (onwall(playerx+0.5,playery+2)){playerx+=0.5}
- if (onwall(playerx+2,playery+1.5)) {playerx-=0.5}
- if (onwall(playerx+2,playery+2)) {playerx-=0.5}
- if (onwall(playerx+0.5,playery+2.5)) {playery-=0.5}
- if (onwall(playerx+1,playery+2.5)) {playery-=0.5}
- if (onwall(playerx+1.5,playery+2.5)) {playery-=0.5}
- if (onwall(playerx+0.5,playery+1)) {playery+=0.5}
- if (onwall(playerx+1,playery+1)) {playery+=0.5}
- if (onwall(playerx+1.5,playery+1)) {playery+=0.5}
- }
- for (i=0; i<4; i++) {
- if (keydown(i)) {
- setani walkslow,;
- break;
- } else
- setani idle,;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement