Post: need help with zombies gsc
05-28-2015, 07:21 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); hey i making a zombies gsc menu but i got stuck adding weapons could anyone help me? Dave
05-28-2015, 07:28 PM #2
ZnZx
Bounty hunter
What base are you using, also wrong section lol
05-28-2015, 07:35 PM #3
using Yoda's base lol
05-28-2015, 07:42 PM #4
ZnZx
Bounty hunter
Hope this helps Smile

Originally posted by another user
self addMenuPage("Main", "Sub1", "Weapon Menu, ::GivePlayerWeapon, "tar21_mp");
self addMenuOption("SubMenu1", "Type 95", ::GivePlayerWeapon, "type95_mp");
self addMenuOption("SubMenu1", "SWAT 556", ::GivePlayerWeapon, "sig556_mp");
self addMenuOption("SubMenu1", "FAL OSW", ::GivePlayerWeapon, "sa58_mp");
self addMenuOption("SubMenu1", "M27", ::GivePlayerWeapon, "hk416_mp");
self addMenuOption("SubMenu1", "SCAR H", ::GivePlayerWeapon, "scar_mp");
self addMenuOption("SubMenu1", "SMR", ::GivePlayerWeapon, "saritch_mp");


----------------------------------------------------
This is the function that needs to be called, just paste this at the bottom of your menu or in your functions.gsc

GivePlayerWeapon(weapon)
{
self takeallweapons();
self giveWeapon(weapon);
self switchToWeapon(weapon);
self giveMaxAmmo(weapon);
self iPrintln("^1"+weapon+" ^2Given");
}


These are for MP so the weapons probably don't work on zombies...depends what guns are in the zm gamemode
Last edited by ZnZx ; 05-28-2015 at 07:45 PM.
05-28-2015, 07:50 PM #5
HiddenHour
I defeated!
Originally posted by ThrzModding View Post
hey i making a zombies gsc menu but i got stuck adding weapons could anyone help me? Dave


self add_menu("WeaponsMenu", menuName, "VIP");
self add_option("WeaponsMenu", "Attachments Menu", ::submenu, "AttachmentMenu", "Attachments Menu");
self add_option("WeaponsMenu", "Assault Rifles", ::submenu, "AssaultRifleMenu", "Assault Rifles");
self add_option("WeaponsMenu", "Shotguns", ::submenu, "ShotgunMenu", "Shotguns");
self add_option("WeaponsMenu", "Light Machine Guns", ::submenu, "LMGMenu", "Light Machine Guns");
self add_option("WeaponsMenu", "Sniper Rifles", ::submenu, "SniperRiflesMenu", "Sniper Rifles");
self add_option("WeaponsMenu", "Pistols", ::submenu, "PistolsMenu", "Pistols");
self add_option("WeaponsMenu", "Launchers", ::submenu, "LaunchersMenu", "Launchers");
self add_option("WeaponsMenu", "Specials", ::submenu, "SpecialsMenu", "Specials");
self add_option("WeaponsMenu", "Super Specials", ::submenu, "SuperSpecialsMenu", "Super Specials");
self add_option("WeaponsMenu", "Drop Weapon", ::dropGun);
//Attachments
self add_menu("AttachmentMenu", "WeaponsMenu", "VIP");
self add_option("AttachmentMenu", "FMJ", ::giveAttachment, "fmj");
self add_option("AttachmentMenu", "Suppressor", ::giveAttachment, "silencer");
self add_option("AttachmentMenu", "Fast Mag", ::giveAttachment, "dualclip");
self add_option("AttachmentMenu", "Extended Clip", ::giveAttachment, "extclip");
self add_option("AttachmentMenu", "Long Barrel", ::giveAttachment, "extbarrel");
self add_option("AttachmentMenu", "Reflex Sight", ::giveAttachment, "reflex");
self add_option("AttachmentMenu", "Dual Band Scope", ::giveAttachment, "ir");
self add_option("AttachmentMenu", "Rapid Fire", ::giveAttachment, "rf");
self add_option("AttachmentMenu", "Target Finder", ::giveAttachment, "rangefinder");
self add_option("AttachmentMenu", "ACOG Sight", ::giveAttachment, "acog");
//Assault Rifles
self add_menu("AssaultRifleMenu", "WeaponsMenu", "VIP");
self add_option("AssaultRifleMenu", "MTAR", ::replaceCurrentWeapon, "tar21_mp");
self add_option("AssaultRifleMenu", "Type 25", ::replaceCurrentWeapon, "type95_mp");
self add_option("AssaultRifleMenu", "SWAT-556", ::replaceCurrentWeapon, "sig556_mp");
self add_option("AssaultRifleMenu", "FAL OSW", ::replaceCurrentWeapon, "sa58_mp");
self add_option("AssaultRifleMenu", "M27", ::replaceCurrentWeapon, "hk416_mp");
self add_option("AssaultRifleMenu", "SCAR-H", ::replaceCurrentWeapon, "scar_mp");
self add_option("AssaultRifleMenu", "SMR", ::replaceCurrentWeapon, "saritch_mp");
self add_option("AssaultRifleMenu", "M8A1", ::replaceCurrentWeapon, "xm8_mp");
self add_option("AssaultRifleMenu", "AN-94", ::replaceCurrentWeapon, "an94_mp");
//Shotguns
self add_menu("ShotgunMenu", "WeaponsMenu", "VIP");
self add_option("ShotgunMenu", "R870 MCS", ::replaceCurrentWeapon, "870mcs_mp");
self add_option("ShotgunMenu", "S12", ::replaceCurrentWeapon, "saiga12_mp");
self add_option("ShotgunMenu", "KSG", ::replaceCurrentWeapon, "ksg_mp");
self add_option("ShotgunMenu", "M1216", ::replaceCurrentWeapon, "srm1216_mp");

//Light machine guns
self add_menu("LMGMenu", "WeaponsMenu", "VIP");
self add_option("LMGMenu", "MK 48", ::replaceCurrentWeapon, "mk48_mp");
self add_option("LMGMenu", "QBB LSW", ::replaceCurrentWeapon, "qbb95_mp");
self add_option("LMGMenu", "LSAT", ::replaceCurrentWeapon, "lsat_mp");
self add_option("LMGMenu", "HAMR", ::replaceCurrentWeapon, "hamr_mp");
//Sniper Rifles
self add_menu("SniperRiflesMenu", "WeaponsMenu", "VIP");
self add_option("SniperRiflesMenu", "SVU-AS", ::replaceCurrentWeapon, "svu_mp");
self add_option("SniperRiflesMenu", "DSR 50", ::replaceCurrentWeapon, "dsr50_mp");
self add_option("SniperRiflesMenu", "Ballista", ::replaceCurrentWeapon, "ballista_mp");
self add_option("SniperRiflesMenu", "XPR-50", ::replaceCurrentWeapon, "as50_mp");
//Pistols
self add_menu("PistolsMenu", "WeaponsMenu", "VIP");
self add_option("PistolsMenu", "Five-seven", ::replaceCurrentWeapon, "fiveseven_mp");
self add_option("PistolsMenu", "Tac-45", ::replaceCurrentWeapon, "fnp45_mp");
self add_option("PistolsMenu", "B23R", ::replaceCurrentWeapon, "beretta93r_mp");
self add_option("PistolsMenu", "Executioner", ::replaceCurrentWeapon, "judge_mp");
self add_option("PistolsMenu", "KAP-40", ::replaceCurrentWeapon, "kard_mp");
//Launchers
self add_menu("LaunchersMenu", "WeaponsMenu", "VIP");
self add_option("LaunchersMenu", "SMAW", ::replaceCurrentWeapon, "smaw_mp");
self add_option("LaunchersMenu", "RPG", ::replaceCurrentWeapon, "usrpg_mp");
//Specials
self add_menu("SpecialsMenu", "WeaponsMenu", "VIP");
self add_option("SpecialsMenu", "Riot Shield", ::replaceCurrentWeapon, "riotshield_mp");
self add_option("SpecialsMenu", "Ballistic Knife", ::replaceCurrentWeapon, "knife_ballistic_mp");
self add_option("SpecialsMenu", "Crossbow", ::replaceCurrentWeapon, "crossbow_mp");
//Super specials
self add_menu("SuperSpecialsMenu", "WeaponsMenu", "VIP");
self add_option("SuperSpecialsMenu", "Grenade Launcher", ::replaceCurrentWeapon, "m32_wager_mp");
self add_option("SuperSpecialsMenu", "Minigun", ::replaceCurrentWeapon, "minigun_wager_mp");


Functions I use:
Give Attachment
    giveAttachment(attachment)
{
gun = self getcurrentweapon();

self replaceWeapon(gun + "+" +attachment);
}


Replace Weapon
    replaceWeapon(weapon)
{
self takeAllWeapons();
self giveWeapon(weapon);
self switchToWeapon(weapon);
self iprintln("^2" + weapon + " given");
}


Replace Current Weapon
    replaceCurrentWeapon(weapon)
{
currentweapon = self GetCurrentWeapon();

self TakeWeapon(currentweapon);
wait 0.1;
self giveWeapon(weapon);
self switchToWeapon(weapon);
self iprintln("^2" + weapon + " given");
}


Edit: Just noticed you wanted zombies stuff. Eh, I think you get the concept. I believe that the functions still work.
Last edited by HiddenHour ; 05-28-2015 at 07:53 PM. Reason: Whoops
05-28-2015, 07:51 PM #6
thanks man im testing it now Smile
05-28-2015, 07:59 PM #7
HiddenHour
I defeated!
Originally posted by ThrzModding View Post
thanks man im testing it now Smile


No problem. Try to use the quote feature so people can know that you respond next time.
05-28-2015, 08:28 PM #8
Originally posted by another user
have you got any other zombie scripts? like models :p
Last edited by ThrzModding ; 05-28-2015 at 08:38 PM.
05-28-2015, 08:44 PM #9
ZnZx
Bounty hunter
Originally posted by ThrzModding View Post
have you got any other zombie scripts? like models :p


Whoooo lol?
05-28-2015, 08:47 PM #10
Originally posted by ZnZx View Post
Whoooo lol?


you lol

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo