Post: Help.. My GSC Script Isn't Working And I've Been Stuck For Days...
06-02-2020, 08:07 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); So I Am Trying To Create A Script That Would Give You The RayGun If You Aimed And Stabbed And Give You The Mustang And Sally If You Aimed And Hit The Use Button. Well, The Game Crashes Upon Loading Into A Game And I'm Out Of Luck So I Thought I Would Ask The Pros. Here is the code.
    /*
* Black Ops 2 - GSC Studio by iMCSx
*
* Creator : qiell
* Project : Project Chessecake
* Mode : Zombies
* Date : 2020/06/02 - 15:24:29
*
*/

#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes_zm\_hud_util;
#include maps\mp\gametypes_zm\_hud_message;

init()
{
level thread onPlayerConnect();
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);
player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;Winky Winky
{
self waittill("spawned_player");
welcome();
while(1)
{
wait(0.25);
if (MeleeButtonPressed() && AdsButtonPressed())
{
self thread giveRayGun();
iprintlnbold("^5Gave Raygun!");
}
if (UseButtonPressed() && AdsButtonPressed())
{
self thread giveMustangAndSally();
iprintlnbold("^5Gave Mustang&Sally!");
}
}
}
}

giveRayGun()
{
level.player_too_many_weapons_monitor = 0;
self giveWeapon("ray_gun_zm");
self switchToWeapon("ray_gun_zm");
}

giveMustangAndSally()
{
level.player_too_many_weapons_monitor = 0;
self giveWeapon("m1911_upgraded_zm");
self switchToWeapon("m1911_upgraded_zm");
}

welcome()
{
iprintln("^5Welcome To Project Chessecake!");
iprintln("^5Status [Host]");
wait(5);
iprintlnbold("^5Enjoy Your Game!");
}

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo