UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

whats wrong with my god mod trigger

broken avatar :(
Created 7 years ago
by hajhaka
0 Members and 1 Guest are viewing this topic.
4,911 views
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 1 November 2013
Last active: 3 years ago
Posts
61
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
hajhaka's Groups
hajhaka's Contact & Social Links
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
Code Snippet
Plaintext
function givegod()
{
trigger = GetEnt("GetGod", "targetname");
trigger SetHintString("Press ^3&&1^7 For GOD MODE");
trigger SetCursorHint("HINT_NOICON");
GodCost = 1000;
trigger waittill("trigger", player);

if(player.score >= GodCost)
{
player zm_score::minus_to_player_score(GodCost);
trigger PlayLocalSound( "cha_ching" );
ModVar( "god", 1 );
break;
}
else
{
trigger PlayLocalSound ( "deny" );
}
}
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 4 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Signature
Donate to me if you enjoy my work. https://www.paypal.me/thezombiekilla6
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social LinksMrZ0mbiesFanaticdust103194MrZ0mbiesFanatic
To make the trigger disappear after you use it, you need to do trigger delete(); or trigger TriggerEnable(false); (True will enable it again.

Also I am not too familar with changing dvars via script on BO3, but to use the cheat via console you need to do /god, so maybe you just need to add the / before god in the script.
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 1 November 2013
Last active: 3 years ago
Posts
61
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
hajhaka's Groups
hajhaka's Contact & Social Links
To make the trigger disappear after you use it, you need to do trigger delete(); or trigger TriggerEnable(false); (True will enable it again.

Also I am not too familar with changing dvars via script on BO3, but to use the cheat via console you need to do /god, so maybe you just need to add the / before god in the script.

where should i add the TriggerEnable(false);?

Double Post Merge: November 22, 2016, 10:06:45 pm
thanks dust tho i still can't get god mode working
Last Edit: November 22, 2016, 10:06:45 pm by hajhaka
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 4 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social LinksMrZ0mbiesFanaticdust103194MrZ0mbiesFanatic
where should i add the TriggerEnable(false);?

Double Post Merge: November 22, 2016, 10:06:45 pm
thanks dust tho i still can't get god mode working

After the trigger waittill

And not sure why the dvar code isnt working, maybe someone more experienced can help.
Marked as best answer by hajhaka 7 years ago
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 1 November 2013
Last active: 3 years ago
Posts
61
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
hajhaka's Groups
hajhaka's Contact & Social Links
well see
broken avatar :(
×
broken avatar :(
Location: at
Date Registered: 26 November 2016
Last active: 6 years ago
Posts
45
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
Signature
12 year old music critic, quadrasexual Minecrafter, Linkin Park fan, Hentai enthusiast, intelligent atheist and vegan.
×
Cxwh's Groups
Cxwh's Contact & Social LinksCxwhModsGodAspire
You don't have to use Dvars to do stuff like this... Try to get creative and work around problems

Call one of them when the trigger gets triggered
Code Snippet
Plaintext
//I'm pretty sure self.god = !self.god works in gsc if not just make a functions that returns the opposite state or bool or idk
function godmode()
{
self.god = !self.god;
if(self.god)
self thread monitor_health();
else
self notify("end_godmode");
self.god = !self.god;
}
function monitor_health()
{
self endon("end_godmode");

self.maxhealth = 9999999;
while(self.health != self.maxhealth)
{
self.health = self.maxhealth;
wait 0.1;
}
}

//or even more simple use engine functions
function godmode()
{
self.god = !self.god;
if(self.god)
self EnableInvulnerability();
else
self DisableInvulnerability();
}
These scripts aslo toggle godmode so you can call them again to disable godmode again
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
This one will break out oif the while loop as soon as self.health == self.maxhealth, so that wont be very usefull..

Code Snippet
Plaintext
function monitor_health()
{
self endon("end_godmode");

self.maxhealth = 9999999;
while(self.health != self.maxhealth)
{
self.health = self.maxhealth;
wait 0.1;
}
}


Last Edit: November 30, 2016, 05:39:43 pm by BluntStuffy
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 1 November 2013
Last active: 3 years ago
Posts
61
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
hajhaka's Groups
hajhaka's Contact & Social Links
Fixed this looooong time ago

 
Loading ...