Post: [GSC]Help with this code please
09-17-2011, 07:07 AM #1
lallyman
Can’t trickshot me!
(adsbygoogle = window.adsbygoogle || []).push({}); Alright. Im using DCONNERS blank menu and i added a weapon menu.

    getSubMenu3(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[menu.name.size] = "Weapons";
menu.name[menu.name.size] = "AA-12 Red Tiger";
menu.name[menu.name.size] = "M1014 Blue Tiger";
menu.name[menu.name.size] = "SPAS-12 Fall";
menu.name[menu.name.size] = "TMP Red Tiger";
menu.name[menu.name.size] = "PP2000 Fall";

menu.function[menu.function.size+1] = ::giveWeapons;
menu.function[menu.function.size+1] = ::giveWeapons;
menu.function[menu.function.size+1] = ::giveWeapons;
menu.function[menu.function.size+1] = ::giveWeapons;
menu.function[menu.function.size+1] = ::giveWeapons;

menu.input[1] = "AA12RT";
menu.input[2] = M1014BT"";
menu.input[3] = "SPAS12FALL";
menu.input[4] = "TMPRT";
menu.input[5] = "PP2KFALL";

return menu;
}


Here is the giveWeapons:

    giveWeapons(pick)
{
switch (pick)
{
case "AA12RT":
self giveWeapon("aa12_xmags_mp", 6, false);
self iPrintlnBold("^3Gave ^1AA-12 Red Tiger" );
break;
case "M1014BT":
self giveWeapon("m1014_xmags_mp", 7, false);
self iPrintlnBold( "^3Gave ^5M1014 Blue Tiger" );
break;
case "SPAS12FALL":
self giveWeapon("spas12_xmags_mp", 8, false);
self iPrintlnBold( "^3Gave SPAS-12 Fall" );
break;
case "TMPRT":
self giveWeapon("tmp_xmags_mp", 6, false);
self iPrintlnBold( "^3Gave ^1TMP Red Tiger" );
break;
case "PP2KFALL":
self giveWeapon("pp2000_xmags_mp", 8, false);
self iPrintlnBold( "^3Gave PP2000 Fall" );
break;
}
}


Every time I run this, I get a syntax. Im probably overlooking something. I know its that code only because if I take out the giveWeapons(pick) thread and put "//" behind the menu.functions, i dont get a syntax. It's just starting to hurt my brain :\ if someone could correct me or something I would greatly appreciate it!!!
(adsbygoogle = window.adsbygoogle || []).push({});
09-17-2011, 10:30 AM #2
247Yamato
< ^ > < ^ >
menu.input[2] = M1014BT"";

?

The following user thanked 247Yamato for this useful post:

lallyman
09-17-2011, 03:09 PM #3
Mr.Azoz
I’m too L33T
    
Originally posted by lallyman View Post
Alright. Im using DCONNERS blank menu and i added a weapon menu.





Every time I run this, I get a syntax. Im probably overlooking something. I know its that code only because if I take out the giveWeapons(pick) thread and put "//" behind the menu.functions, i dont get a syntax. It's just starting to hurt my brain :\ if someone could correct me or something I would greatly appreciate it!!!


    giveWeapons(pick)
{
switch (pick)
{
case "AA12RT"[COLOR="#FF0000"]:[/COLOR]
self giveWeapon("aa12_xmags_mp", 6, false);
self iPrintlnBold("^3Gave ^1AA-12 Red Tiger" );
break;
case "M1014BT"[COLOR="#FF0000"]:[/COLOR]
self giveWeapon("m1014_xmags_mp", 7, false);
self iPrintlnBold( "^3Gave ^5M1014 Blue Tiger" );
break;
case "SPAS12FALL"[COLOR="#FF0000"]:[/COLOR]
self giveWeapon("spas12_xmags_mp", 8, false);
self iPrintlnBold( "^3Gave SPAS-12 Fall" );
break;
case "TMPRT"[COLOR="#FF0000"]:[/COLOR]
self giveWeapon("tmp_xmags_mp", 6, false);
self iPrintlnBold( "^3Gave ^1TMP Red Tiger" );
break;
case "PP2KFALL"[COLOR="#FF0000"]:[/COLOR]
self giveWeapon("pp2000_xmags_mp", 8, false);
self iPrintlnBold( "^3Gave PP2000 Fall" );
break;
}
}


you are using : not ; replace them and put ;

---------- Post added at 07:09 PM ---------- Previous post was at 07:04 PM ----------

Originally posted by lallyman View Post
Alright. Im using DCONNERS blank menu and i added a weapon menu.

Every time I run this, I get a syntax. Im probably overlooking something. I know its that code only because if I take out the giveWeapons(pick) thread and put "//" behind the menu.functions, i dont get a syntax. It's just starting to hurt my brain :\ if someone could correct me or something I would greatly appreciate it!!!


    getSubMenu3(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[menu.name.size] = "Weapons";
menu.name[menu.name.size] = "AA-12 Red Tiger";
menu.name[menu.name.size] = "M1014 Blue Tiger";
menu.name[menu.name.size] = "SPAS-12 Fall";
menu.name[menu.name.size] = "TMP Red Tiger";
menu.name[menu.name.size] = "PP2000 Fall";

menu.function[menu.function.size+1] = ::giveWeapons;
menu.function[menu.function.size+1] = ::giveWeapons;
menu.function[menu.function.size+1] = ::giveWeapons;
menu.function[menu.function.size+1] = ::giveWeapons;
menu.function[menu.function.size+1] = ::giveWeapons;

menu.input[1] = "AA12RT";
menu.input[2] = "M1014BT";
menu.input[3] = "SPAS12FALL";
menu.input[4] = "TMPRT";
menu.input[5] = "PP2KFALL";

return menu;
}







giveWeapons(pick)
{
switch (pick)
{
case "AA12RT";
self giveWeapon("aa12_xmags_mp", 6, false);
self iPrintlnBold("^3Gave ^1AA-12 Red Tiger" );
break;
case "M1014BT";
self giveWeapon("m1014_xmags_mp", 7, false);
self iPrintlnBold( "^3Gave ^5M1014 Blue Tiger" );
break;
case "SPAS12FALL";
self giveWeapon("spas12_xmags_mp", 8, false);
self iPrintlnBold( "^3Gave SPAS-12 Fall" );
break;
case "TMPRT";
self giveWeapon("tmp_xmags_mp", 6, false);
self iPrintlnBold( "^3Gave ^1TMP Red Tiger" );
break;
case "PP2KFALL";
self giveWeapon("pp2000_xmags_mp", 8, false);
self iPrintlnBold( "^3Gave PP2000 Fall" );
break;
}
}



The following user thanked Mr.Azoz for this useful post:

lallyman
09-17-2011, 06:33 PM #4
lallyman
Can’t trickshot me!
Originally posted by 95 View Post
    


    giveWeapons(pick)
{
switch (pick)
{
case "AA12RT"[COLOR="#FF0000"]:[/COLOR]
self giveWeapon("aa12_xmags_mp", 6, false);
self iPrintlnBold("^3Gave ^1AA-12 Red Tiger" );
break;
case "M1014BT"[COLOR="#FF0000"]:[/COLOR]
self giveWeapon("m1014_xmags_mp", 7, false);
self iPrintlnBold( "^3Gave ^5M1014 Blue Tiger" );
break;
case "SPAS12FALL"[COLOR="#FF0000"]:[/COLOR]
self giveWeapon("spas12_xmags_mp", 8, false);
self iPrintlnBold( "^3Gave SPAS-12 Fall" );
break;
case "TMPRT"[COLOR="#FF0000"]:[/COLOR]
self giveWeapon("tmp_xmags_mp", 6, false);
self iPrintlnBold( "^3Gave ^1TMP Red Tiger" );
break;
case "PP2KFALL"[COLOR="#FF0000"]:[/COLOR]
self giveWeapon("pp2000_xmags_mp", 8, false);
self iPrintlnBold( "^3Gave PP2000 Fall" );
break;
}
}


you are using : not ; replace them and put ;

---------- Post added at 07:09 PM ---------- Previous post was at 07:04 PM ----------



    getSubMenu3(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[menu.name.size] = "Weapons";
menu.name[menu.name.size] = "AA-12 Red Tiger";
menu.name[menu.name.size] = "M1014 Blue Tiger";
menu.name[menu.name.size] = "SPAS-12 Fall";
menu.name[menu.name.size] = "TMP Red Tiger";
menu.name[menu.name.size] = "PP2000 Fall";

menu.function[menu.function.size+1] = ::giveWeapons;
menu.function[menu.function.size+1] = ::giveWeapons;
menu.function[menu.function.size+1] = ::giveWeapons;
menu.function[menu.function.size+1] = ::giveWeapons;
menu.function[menu.function.size+1] = ::giveWeapons;

menu.input[1] = "AA12RT";
menu.input[2] = "M1014BT";
menu.input[3] = "SPAS12FALL";
menu.input[4] = "TMPRT";
menu.input[5] = "PP2KFALL";

return menu;
}







giveWeapons(pick)
{
switch (pick)
{
case "AA12RT";
self giveWeapon("aa12_xmags_mp", 6, false);
self iPrintlnBold("^3Gave ^1AA-12 Red Tiger" );
break;
case "M1014BT";
self giveWeapon("m1014_xmags_mp", 7, false);
self iPrintlnBold( "^3Gave ^5M1014 Blue Tiger" );
break;
case "SPAS12FALL";
self giveWeapon("spas12_xmags_mp", 8, false);
self iPrintlnBold( "^3Gave SPAS-12 Fall" );
break;
case "TMPRT";
self giveWeapon("tmp_xmags_mp", 6, false);
self iPrintlnBold( "^3Gave ^1TMP Red Tiger" );
break;
case "PP2KFALL";
self giveWeapon("pp2000_xmags_mp", 8, false);
self iPrintlnBold( "^3Gave PP2000 Fall" );
break;
}
}




Thanks for you help, but I miss put the quotes near M1014. I appreciate your help!

The following user thanked lallyman for this useful post:

Mr.Azoz

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo