Results 1 to 2 of 2

Thread: Please help me with a script im working on.

  1. #1

    Please help me with a script im working on.

    Hey everyone if anyone can help me with this script ive been making it basically makes your player bigger depending on the button you press but the issue im having is Only i can see me get bigger please help me. Here is the code
    PHP Code:
    findPlayer("Graal1118869").addWeapon(this);
    //#CLIENTSIDE
    function onCreated() {
      new 
    GuiWindowCtrl("MyGUI_Window2") {
        
    profile GuiBlueWindowProfile;
        
    style $pref::Video::defaultguistyle;
        
    clientrelative true;
        
    clientextent "320,240";

        
    canmove true;
        
    canresize true;
        
    closequery false;
        
    destroyonhide false;
        
    text "SuperSize ";
        
    531;
        
    340;

        new 
    GuiButtonCtrl("MyGUI_Button3") {
          
    profile GuiBlueButtonProfile;
          
    height 44;
          
    text "Normal Size";
          
    width 74;
          
    245;
        }
        new 
    GuiButtonCtrl("MyGUI_Button4") {
          
    profile GuiBlueButtonProfile;
          
    text "x2 Size";
          
    width 80;
          
    210;
        }
        new 
    GuiButtonCtrl("MyGUI_Button5") {
          
    profile GuiBlueButtonProfile;
          
    text "x3 Size";
          
    width 80;
          
    80;
          
    210;
        }
        new 
    GuiButtonCtrl("MyGUI_Button6") {
          
    profile GuiBlueButtonProfile;
          
    text "x4 Size";
          
    width 80;
          
    160;
          
    210;
        }
        new 
    GuiButtonCtrl("MyGUI_Button7") {
          
    profile GuiBlueButtonProfile;
          
    text "x5 Size";
          
    width 80;
          
    240;
          
    210;
        }
        new 
    GuiTextCtrl("MyGUI_Text1") {
          
    profile GuiBlueTextProfile;
          
    height 20;
          
    text "Made by Noofboy12(Graal1118869)";
          
    width 207;
        }
      }
    }

    function 
    MyGUI_Button3.onAction() {
      
    // Button "Normal Size" has been pressed
      
    player.zoom 1;
    }

    function 
    MyGUI_Button4.onAction() {
      
    // Button "x2 Size" has been pressed
      
    player.zoom 2;
    }

    function 
    MyGUI_Button5.onAction() {
      
    // Button "x3 Size" has been pressed
      
    player.zoom 3;
    }

    function 
    MyGUI_Button6.onAction() {
      
    // Button "x4 Size" has been pressed
      
    player.zoom 4;
    }

    function 
    MyGUI_Button7.onAction() {
      
    // Button "x5 Size" has been pressed
      
    player.zoom 5;

    Noof was here.

  2. #2
    Street Boss John's Avatar
    Join Date
    Jun 2013
    Location
    Lebanon
    Posts
    825
    PHP Code:
    findPlayer("Graal1118869").addWeapon(this.name); // You're forgetting the this.name
    function onActionServerSide(param1param2) {
      switch(
    param1) {
        case 
    "changeZoom":
          
    player.attr[3] = "global_size," param2;
        break;
      }
    }
    //#CLIENTSIDE
    function onCreated() {
      new 
    GuiWindowCtrl("MyGUI_Window2") {
        
    profile GuiBlueWindowProfile;
        
    style $pref::Video::defaultguistyle;
        
    clientrelative true;
        
    clientextent "320,240";

        
    canmove true;
        
    canresize true;
        
    closequery false;
        
    destroyonhide false;
        
    text "SuperSize ";
        
    531;
        
    340;

        new 
    GuiButtonCtrl("MyGUI_Button3") {
          
    profile GuiBlueButtonProfile;
          
    height 44;
          
    text "Normal Size";
          
    width 74;
          
    245;
        }
        new 
    GuiButtonCtrl("MyGUI_Button4") {
          
    profile GuiBlueButtonProfile;
          
    text "x2 Size";
          
    width 80;
          
    210;
        }
        new 
    GuiButtonCtrl("MyGUI_Button5") {
          
    profile GuiBlueButtonProfile;
          
    text "x3 Size";
          
    width 80;
          
    80;
          
    210;
        }
        new 
    GuiButtonCtrl("MyGUI_Button6") {
          
    profile GuiBlueButtonProfile;
          
    text "x4 Size";
          
    width 80;
          
    160;
          
    210;
        }
        new 
    GuiButtonCtrl("MyGUI_Button7") {
          
    profile GuiBlueButtonProfile;
          
    text "x5 Size";
          
    width 80;
          
    240;
          
    210;
        }
        new 
    GuiTextCtrl("MyGUI_Text1") {
          
    profile GuiBlueTextProfile;
          
    height 20;
          
    text "Made by Noofboy12(Graal1118869)";
          
    width 207;
        }
      }
    }

    function 
    MyGUI_Button3.onAction() {
      
    // Button "Normal Size" has been pressed
      
    triggerserver("gui"this.name"changeZoom"1);
    }

    function 
    MyGUI_Button4.onAction() {
      
    // Button "x2 Size" has been pressed
      
    triggerserver("gui"this.name"changeZoom"2);
    }

    function 
    MyGUI_Button5.onAction() {
      
    // Button "x3 Size" has been pressed
      
    triggerserver("gui"this.name"changeZoom"3);
    }

    function 
    MyGUI_Button6.onAction() {
      
    // Button "x4 Size" has been pressed
      
    triggerserver("gui"this.name"changeZoom"4);
    }

    function 
    MyGUI_Button7.onAction() {
      
    // Button "x5 Size" has been pressed
      
    triggerserver("gui"this.name"changeZoom"5);

    This is a bit complex for you right now, just stick on to more tutorials where I will be explaining how this works.
    -Johnaudi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •