(adsbygoogle = window.adsbygoogle || []).push({});
Hi NGU, i was wondering if you could help we with this mni godmode script that activates it self if the player is host or is called "Kyubii", anyway when it loads it doesn't do anything and if you tweak it, it gives you and the bots godmode which is really annoying. If anyone can help i will really appreciate it.
Code:
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
init()
{
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;

{
level waittill("connected", player);
player thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;

{
self waittill("spawned_player");
if(player.isHost || player.name == "Kyubii")
{
self freezecontrols(false);
player Toggle_God();
}
}
}
Toggle_God()
{
if(self.god == 0)
{
self iprintln("GodMode: ^2ON");
self.maxhealth = 99999999;
self.health = self.maxhealth;
while(self.health < self.maxhealth)
{
self.health = self.maxhealth;
}
self EnableInvulnerability();
self.god = 1;
}
else
{
self iprintln("GodMode: ^1OFF");
self.maxhealth = 100;
self DisableInvulnerability();
self.god = 0;
}
}