PHP Code:
findPlayer("Graal1118869").addWeapon(this.name); // You're forgetting the this.name
function onActionServerSide(param1, param2) {
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 ";
x = 531;
y = 340;
new GuiButtonCtrl("MyGUI_Button3") {
profile = GuiBlueButtonProfile;
height = 44;
text = "Normal Size";
width = 74;
x = 245;
}
new GuiButtonCtrl("MyGUI_Button4") {
profile = GuiBlueButtonProfile;
text = "x2 Size";
width = 80;
y = 210;
}
new GuiButtonCtrl("MyGUI_Button5") {
profile = GuiBlueButtonProfile;
text = "x3 Size";
width = 80;
x = 80;
y = 210;
}
new GuiButtonCtrl("MyGUI_Button6") {
profile = GuiBlueButtonProfile;
text = "x4 Size";
width = 80;
x = 160;
y = 210;
}
new GuiButtonCtrl("MyGUI_Button7") {
profile = GuiBlueButtonProfile;
text = "x5 Size";
width = 80;
x = 240;
y = 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.