Modme Forums

HELP and TUTORIAL

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: ReKleSs
Im making this script for add buyable random perk.

CODE

function random_perk() { trigger = GetEnt("RandomPerkTrigger", "targetname"); trigger SetHintString("Press ^3&&1^7 For Random Perk [^3Cost^7: ^13250^7]"); trigger SetCursorHint("HINT_NOICON"); RandomPerksCost = 3250; while(1) { trigger waittill("trigger", player); if(player.score >= RandomPerksCost && !isDefined(player.is_ready)) { player zm_score::minus_to_player_score(RandomPerksCost); player PlayLocalSound( "cha_ching" ); player zm_perks::give_random_perk(); player iprintlnbold ("You Buy Random Perk"); player thread random_perk_cooldown(trigger); wait(3); player PlayLocalSound( "cha_ching" ); } else if( isDefined(player.is_ready) && player.is_ready ) { } else { trigger SetHintStringForPlayer ( player, "You Nedd "+RandomPerksCost+" points to buy Random Perk"); player PlayLocalSound ( "deny" ); wait(2); trigger SetHintStringForPlayer(player, "Press ^3&&1^7 For Random Perk [^3Cost^7: ^13250^7]"); } } } function random_perk_cooldown(trigger) { self.is_ready = undefined; trigger SetHintStringForPlayer(self, "Come Back Later!"); wait (150); trigger SetHintStringForPlayer(self, "Press ^3&&1^7 For Random Perk [^3Cost^7: ^13250^7]"); }

I add this

player zm_perks::give_random_perk();

but in launcher when i compile mi map appears this error!

^1

^1^



^1ERR(6E) scripts/zm/zm_calatranca.gsc (131,0) : Compiler Internal Error : Unresolved external 'zm_perks::give_random_perk'



Please give me help to fix this. THANKS


ModmeBot:

Reply By: natesmithzombies
At first glance maybe you forgot to use the

#using scripts\zm\_zm_perks;

at the top of the gsc?


ModmeBot:

Reply By: ReKleSs

natesmithzombiesAt first glance maybe you forgot to use the

#using scripts\zm\_zm_perks;

at the top of the gsc?


Ohh man i put this:



#using scripts\zm\_zm_perk;



xD

Im Stupid xD.

Thanks for helping. After i go to make tutorial how to do this script.

THANKS


ModmeBot:

Reply By: natesmithzombies

ReKleSs
natesmithzombiesAt first glance maybe you forgot to use the

#using scripts\zm\_zm_perks;

at the top of the gsc?


Ohh man i put this:



#using scripts\zm\_zm_perk;



xD

Im Stupid xD.

Thanks for helping. After i go to make tutorial how to do this script.

THANKS


haha its always the little things that get me too