Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: m1cke I made this script when i was board but it dosen't give me god mod
and when i buy it the trigger dosen't dissaper like it still says press f for god mod
thanks for eny help
functiongivegod(){trigger=GetEnt("GetGod","targetname");triggerSetHintString("Press ^3&&1^7 For GOD MODE");triggerSetCursorHint("HINT_NOICON");GodCost=1000;triggerwaittill("trigger",player);if(player.score>=GodCost){playerzm_score::minus_to_player_score(GodCost);triggerPlayLocalSound("cha_ching");ModVar("god",1);break;}else{triggerPlayLocalSound("deny");}}
ModmeBot:
Reply By: natesmithzombies Give this a shot. I added a few things to make it a bit better for multiple players.
functiongivegod(){trigger=GetEnt("GetGod","targetname");triggerSetHintString("Press ^3&&1^7 For GOD MODE");triggerSetCursorHint("HINT_NOICON");GodCost=1000;while(1)// Added this in a loop so that players can have a multiple chances to buy the trigger {triggerwaittill("trigger",player);if(player.score>=GodCost&&!isDefined(player.is_god))// added an additional check {playerzm_score::minus_to_player_score(GodCost);playerPlayLocalSound("cha_ching");// Changed trigger to player. Only players can use PlayLocalSound// ModVar( "god", 1 ); // Not sure why this isnt workingplayerEnableInvulnerability();// This is the same thing as god mode player.is_god=true;// added this for some more checks // break; you dont need this triggerSetHintStringForPlayer(player,"Press ^3&&1^7 to disable God Mode");// never actually tested the hintstring for specific players. This is new from WaW GSC so let me know if this works wait(2);}elseif(isDefined(player.is_god)&&player.is_god)// added the option to disable god mode {playerDisableInvulnerability();triggerSetHintStringForPlayer(player,"Press ^3&&1^7 For GOD MODE");player.is_god=undefined;wait(2);}else{triggerSetHintStringForPlayer(player,"You Need "+GodCost+" points to Enable God Mode");// added this because it looks nicer IMO triggerPlayLocalSound("deny");wait(2);// wait here a bit because players could just spam the trigger triggerSetHintStringForPlayer(player,"Press ^3&&1^7 For GOD MODE");}}}
ModmeBot:
Reply By: m1cke
natesmithzombiesGive this a shot. I added a few things to make it a bit better for multiple players.
functiongivegod(){trigger=GetEnt("GetGod","targetname");triggerSetHintString("Press ^3&&1^7 For GOD MODE");triggerSetCursorHint("HINT_NOICON");GodCost=1000;while(1)// Added this in a loop so that players can have a multiple chances to buy the trigger {triggerwaittill("trigger",player);if(player.score>=GodCost&&!isDefined(player.is_god))// added an additional check {playerzm_score::minus_to_player_score(GodCost);playerPlayLocalSound("cha_ching");// Changed trigger to player. Only players can use PlayLocalSound// ModVar( "god", 1 ); // Not sure why this isnt workingplayerEnableInvulnerability();// This is the same thing as god mode player.is_god=true;// added this for some more checks // break; you dont need this triggerSetHintStringForPlayer(player,"Press ^3&&1^7 to disable God Mode");// never actually tested the hintstring for specific players. This is new from WaW GSC so let me know if this works wait(2);}elseif(isDefined(player.is_god)&&player.is_god)// added the option to disable god mode {playerDisableInvulnerability();triggerSetHintStringForPlayer(player,"Press ^3&&1^7 For GOD MODE");player.is_god=undefined;wait(2);}else{triggerSetHintStringForPlayer("You Need "+GodCost+" points to Enable God Mode");// added this because it looks nicer IMO triggerPlayLocalSound("deny");wait(2);// wait here a bit because players could just spam the trigger triggerSetHintStringForPlayer(player,"Press ^3&&1^7 For GOD MODE");}}}
i got an error from line 140 "trigger SetHintStringForPlayer( "You Need "+GodCost+" points to Enable God Mode" ); // added this because it looks nicer IMO" says 1 paramters
ModmeBot:
Reply By: m1cke
natesmithzombiesGive this a shot. I added a few things to make it a bit better for multiple players.
functiongivegod(){trigger=GetEnt("GetGod","targetname");triggerSetHintString("Press ^3&&1^7 For GOD MODE");triggerSetCursorHint("HINT_NOICON");GodCost=1000;while(1)// Added this in a loop so that players can have a multiple chances to buy the trigger {triggerwaittill("trigger",player);if(player.score>=GodCost&&!isDefined(player.is_god))// added an additional check {playerzm_score::minus_to_player_score(GodCost);playerPlayLocalSound("cha_ching");// Changed trigger to player. Only players can use PlayLocalSound// ModVar( "god", 1 ); // Not sure why this isnt workingplayerEnableInvulnerability();// This is the same thing as god mode player.is_god=true;// added this for some more checks // break; you dont need this triggerSetHintStringForPlayer(player,"Press ^3&&1^7 to disable God Mode");// never actually tested the hintstring for specific players. This is new from WaW GSC so let me know if this works wait(2);}elseif(isDefined(player.is_god)&&player.is_god)// added the option to disable god mode {playerDisableInvulnerability();triggerSetHintStringForPlayer(player,"Press ^3&&1^7 For GOD MODE");player.is_god=undefined;wait(2);}else{triggerSetHintStringForPlayer("You Need "+GodCost+" points to Enable God Mode");// added this because it looks nicer IMO triggerPlayLocalSound("deny");wait(2);// wait here a bit because players could just spam the trigger triggerSetHintStringForPlayer(player,"Press ^3&&1^7 For GOD MODE");}}}
nvm got the timer thing to work Thanks alot nate
ModmeBot:
Reply By: natesmithzombies
m1ckenvm got the timer thing to work Thanks alot nate
Ahh missed the player argument but I edited the original post so others wont get an error. I can never test things at work or university. I always seem to miss something small. Good to see you got it working!
ModmeBot:
Reply By: m1cke
m1cke
natesmithzombiesGive this a shot. I added a few things to make it a bit better for multiple players.
functiongivegod(){trigger=GetEnt("GetGod","targetname");triggerSetHintString("Press ^3&&1^7 For GOD MODE");triggerSetCursorHint("HINT_NOICON");GodCost=1000;while(1)// Added this in a loop so that players can have a multiple chances to buy the trigger {triggerwaittill("trigger",player);if(player.score>=GodCost&&!isDefined(player.is_god))// added an additional check {playerzm_score::minus_to_player_score(GodCost);playerPlayLocalSound("cha_ching");// Changed trigger to player. Only players can use PlayLocalSound// ModVar( "god", 1 ); // Not sure why this isnt workingplayerEnableInvulnerability();// This is the same thing as god mode player.is_god=true;// added this for some more checks // break; you dont need this triggerSetHintStringForPlayer(player,"Press ^3&&1^7 to disable God Mode");// never actually tested the hintstring for specific players. This is new from WaW GSC so let me know if this works wait(2);}elseif(isDefined(player.is_god)&&player.is_god)// added the option to disable god mode {playerDisableInvulnerability();triggerSetHintStringForPlayer(player,"Press ^3&&1^7 For GOD MODE");player.is_god=undefined;wait(2);}else{triggerSetHintStringForPlayer("You Need "+GodCost+" points to Enable God Mode");// added this because it looks nicer IMO triggerPlayLocalSound("deny");wait(2);// wait here a bit because players could just spam the trigger triggerSetHintStringForPlayer(player,"Press ^3&&1^7 For GOD MODE");}}}
nvm got the timer thing to work Thanks alot nate
only problem i have is i can't buy it again after the timer
ModmeBot:
Reply By: natesmithzombies
m1ckeonly problem i have is i can't buy it again after the timer
What timer? I am not sure what you mean
ModmeBot:
Reply By: m1cke
natesmithzombies
m1ckeonly problem i have is i can't buy it again after the timer
What timer? I am not sure what you mean
i added this what i mean is that it waits 10 min then it disables god mode and i wanna make it buyable again but i can't get it to work
playerzm_score::minus_to_player_score(GodCost);playerPlayLocalSound("cha_ching");// Changed trigger to player. Only players can use PlayLocalSound// ModVar( "god", 1 ); // Not sure why this isnt workingplayerEnableInvulnerability();// This is the same thing as god modeplayer.is_god=true;// added this for some more checksIPrintLnBold("God Mode FOR 10 Minutes");triggerTriggerEnable(false);wait(600);IPrintLnBold("God mode over");playerDisableInvulnerability();triggerTriggerEnable(true);threadgivegod();// I added this to try but it dosen't wanna work :(//break;//trigger SetHintStringForPlayer( player, "Press ^3&&1^7 to disable God Mode" ); // never actually tested the hintstring for specific players. This is new from WaW GSC so let me know if this works
ModmeBot:
Reply By: natesmithzombies
m1cke
natesmithzombies
m1ckeonly problem i have is i can't buy it again after the timer
What timer? I am not sure what you mean
i added this what i mean is that it waits 10 min then it disables god mode and i wanna make it buyable again but i can't get it to work
Try this:
functiongivegod(){trigger=GetEnt("GetGod","targetname");triggerSetHintString("Press ^3&&1^7 For GOD MODE");triggerSetCursorHint("HINT_NOICON");GodCost=1000;while(1)// Added this in a loop so that players can have a multiple chances to buy the trigger{triggerwaittill("trigger",player);if(player.score>=GodCost&&!isDefined(player.is_god))// added an additional check{playerzm_score::minus_to_player_score(GodCost);playerPlayLocalSound("cha_ching");// Changed trigger to player. Only players can use PlayLocalSound// ModVar( "god", 1 ); // Not sure why this isnt workingplayerEnableInvulnerability();// This is the same thing as god modeplayer.is_god=true;// added this for some more checks// break; you dont need thistriggerSetHintStringForPlayer(player,"You Are Already in God Mode");playerthreadgod_cooldown(trigger);wait(2);}elseif(isDefined(player.is_god)&&player.is_god)// added the option to disable god mode{}else{triggerSetHintStringForPlayer(player,"You Need "+GodCost+" points to Enable God Mode");// added this because it looks nicer IMOtriggerPlayLocalSound("deny");wait(2);// wait here a bit because players could just spam the triggertriggerSetHintStringForPlayer(player,"Press ^3&&1^7 For GOD MODE");}}}functiongod_cooldown(trigger){wait(600);triggerSetHintStringForPlayer(self,"Press ^3&&1^7 For GOD MODE");self.is_god=undefined;selfDisableInvulnerability();selfiprintlnbold("God Mode Disabled");}
ModmeBot:
Reply By: m1cke
natesmithzombies
m1cke
natesmithzombies
m1ckeonly problem i have is i can't buy it again after the timer
What timer? I am not sure what you mean
i added this what i mean is that it waits 10 min then it disables god mode and i wanna make it buyable again but i can't get it to work
Try this:
functiongivegod(){trigger=GetEnt("GetGod","targetname");triggerSetHintString("Press ^3&&1^7 For GOD MODE");triggerSetCursorHint("HINT_NOICON");GodCost=1000;while(1)// Added this in a loop so that players can have a multiple chances to buy the trigger{triggerwaittill("trigger",player);if(player.score>=GodCost&&!isDefined(player.is_god))// added an additional check{playerzm_score::minus_to_player_score(GodCost);playerPlayLocalSound("cha_ching");// Changed trigger to player. Only players can use PlayLocalSound// ModVar( "god", 1 ); // Not sure why this isnt workingplayerEnableInvulnerability();// This is the same thing as god modeplayer.is_god=true;// added this for some more checks// break; you dont need thistriggerSetHintStringForPlayer(player,"You Are Already in God Mode");playerthreadgod_cooldown(trigger);wait(2);}elseif(isDefined(player.is_god)&&player.is_god)// added the option to disable god mode{}else{triggerSetHintStringForPlayer(player,"You Need "+GodCost+" points to Enable God Mode");// added this because it looks nicer IMOtriggerPlayLocalSound("deny");wait(2);// wait here a bit because players could just spam the triggertriggerSetHintStringForPlayer(player,"Press ^3&&1^7 For GOD MODE");}}}functiongod_cooldown(trigger){wait(600);triggerSetHintStringForPlayer(self,"Press ^3&&1^7 For GOD MODE");self.is_god=undefined;selfDisableInvulnerability();selfiprintlnbold("God Mode Disabled");}
Thanks nate works perfecly now
ModmeBot:
Reply By: natesmithzombies
m1ckThanks nate works perfecly now
You're welcome
ModmeBot:
Reply By: Blink-420
natesmithzombies
m1ckThanks nate works perfecly now
You're welcome
Is there a way to add a cooldown before you can buy it again? So people couldnt just sit by the trigger with tons of points and be invincible most of the game
ModmeBot:
Reply By: m1cke
Blink-420
natesmithzombies
m1ckThanks nate works perfecly now
You're welcome
Is there a way to add a cooldown before you can buy it again? So people couldnt just sit by the trigger with tons of points and be invincible most of the game
functiongod_cooldown(trigger){wait(600);// Edit this for the cooldown value 1 = 1 secondself.is_god=undefined;selfDisableInvulnerability();selfiprintlnbold("God Mode Disabled");triggerSetHintStringForPlayer(self,"Comback later");wait(1337);// Change 1337 to how meny seconds you wanttriggerSetHintStringForPlayer(self,"Press ^3&&1^7 For GOD MODE");}
All you need to to is replace the cooldown function with this
ModmeBot:
Reply By: Blink-420
m1cke
Blink-420
natesmithzombies
m1ckThanks nate works perfecly now
You're welcome
Is there a way to add a cooldown before you can buy it again? So people couldnt just sit by the trigger with tons of points and be invincible most of the game
functiongod_cooldown(trigger){wait(600);// Edit this for the cooldown value 1 = 1 secondself.is_god=undefined;selfDisableInvulnerability();selfiprintlnbold("God Mode Disabled");triggerSetHintStringForPlayer(self,"Comback later");wait(1337);// Change 1337 to how meny seconds you wanttriggerSetHintStringForPlayer(self,"Press ^3&&1^7 For GOD MODE");}
All you need to to is replace the cooldown function with this