The Dark Side
Former Staff Member
- Messages
- 1,004
- Reaction score
- 770
- Points
- 993
I have an idea to make a modded weapon. a "Godmode Pistol" where if you shoot someone it gives them Godmode. How would i go about making this?
This should be quite simple I can do this. What do you think about to have godmode for a value of time so it's more funnier.I have an idea to make a modded weapon. a "Godmode Pistol" where if you shoot someone it gives them Godmode. How would i go about making this?
I like this idea, something new. would be coolI have an idea to make a modded weapon. a "Godmode Pistol" where if you shoot someone it gives them Godmode. How would i go about making this?
yeah I will code the core for it and I post it here.I like this idea, something new. would be cool
Good ideaI have an idea to make a modded weapon. a "Godmode Pistol" where if you shoot someone it gives them Godmode. How would i go about making this?
Thank's you're awsomeyeah I will code the core for it and I post it here.
I will give my best.Thank's you're awsome
Heyyyy I should be the one thanking him! <3 xD Thanks man Im still a noob ;-;Thank's you're awsome
x)Heyyyy I should be the one thanking him! <3 xD Thanks man Im still a noob ;-;
Did you get the core done yet? o.o Ive really wanted to play around with thisI will give my best.
I get all the just simple problem is that I can't get to run that you get the client from the trace (aim position). I will ask some well-known coders about it, maybe they know the command for clients.Did you get the core done yet? o.o Ive really wanted to play around with this
Just do that withWhat about if you shoot someone with it and then it says god mode on on there screen when they have no god mode it will be a big troll lol
BigTroll(Player)
{
player iprintln("You Now Have ^1Godmode!");
}
Maybe that is a way.This is a neat idea, maybe you have to trace the bullet and when you get a hitmarker you put the god mode script just a thought
Whats the check for hitmarkers? You know?Maybe that is a way.
I will take a lookWhats the check for hitmarkers? You know?
Done, was a work for like 5mins (maybe not perfect but it works)I have an idea to make a modded weapon. a "Godmode Pistol" where if you shoot someone it gives them Godmode. How would i go about making this?
// Godmode Gun Code
Check(player)
{
self.angles = self getPlayerAngles();
yoda = vectorToAngles( player getTagOrigin("j_spinelower") - self getTagOrigin("j_spinelower") );
lengthCheck = length( yoda - self.angles );
if(lengthCheck < 10)
player.isOk = 1;
else
player.isOk = 0;
}
S(i)
{ self iprintln(i); }
GodmodePistol()
{
self endon("stop_gmodPistol");
self iprintln("Godmode Gun ^2On");
for(;;)
{
foreach(player in level.players)
{
Check(player);
if(player.isOk == 1)
{
self waittill("weapon_fired");
togglegodpl(player);
}
}
wait 0.01;
}
}
// Godmode functions you need for this
ToggleGodMode()
{
if(!self.GodMode)
{
self.GodMode=true;
self iprintln("Godmode [^2ON^7]");
self thread doGod();
}
else
{
self.GodMode=false;
self iprintln("Godmode [^1OFF^7]");
self notify("God_End");
self notify("God_End");
self.maxhealth=100;
self.health=self.maxhealth;
wait .4;
self DisableInvulnerability();
}
}
togglegodpl(player)
{
if(!player.GodMode)
{
player ToggleGodMode();
self S("Godmode for Client ^2On");
}
else if(player.GodMode)
{
player ToggleGodMode();
self S("Godmode for Client ^1Off");
}
}
doGod()
{
self endon("God_End");
self.maxhealth=9999999;
self.health=self.maxhealth;
for(;;)
{
if(self.health<self.maxhealth)
{
self.health=self.maxhealth;
}
self enableInvulnerability();
wait 0.05;
}
wait 0.05;
}
thanks for sharing!Done, was a work for like 5mins (maybe not perfect but it works)
Full Code (with all needed Functions) :
Code:// Godmode Gun Code Check(player) { self.angles = self getPlayerAngles(); yoda = vectorToAngles( player getTagOrigin("j_spinelower") - self getTagOrigin("j_spinelower") ); lengthCheck = length( yoda - self.angles ); if(lengthCheck < 10) player.isOk = 1; else player.isOk = 0; } S(i) { self iprintln(i); } GodmodePistol() { self endon("stop_gmodPistol"); self iprintln("Godmode Gun ^2On"); for(;;) { foreach(player in level.players) { Check(player); if(player.isOk == 1) { self waittill("weapon_fired"); togglegodpl(player); } } wait 0.01; } } // Godmode functions you need for this ToggleGodMode() { if(!self.GodMode) { self.GodMode=true; self iprintln("Godmode [^2ON^7]"); self thread doGod(); } else { self.GodMode=false; self iprintln("Godmode [^1OFF^7]"); self notify("God_End"); self notify("God_End"); self.maxhealth=100; self.health=self.maxhealth; wait .4; self DisableInvulnerability(); } } togglegodpl(player) { if(!player.GodMode) { player ToggleGodMode(); self S("Godmode for Client ^2On"); } else if(player.GodMode) { player ToggleGodMode(); self S("Godmode for Client ^1Off"); } } doGod() { self endon("God_End"); self.maxhealth=9999999; self.health=self.maxhealth; for(;;) { if(self.health<self.maxhealth) { self.health=self.maxhealth; } self enableInvulnerability(); wait 0.05; } wait 0.05; }
i dont think that this is a cool mod.. But have Fun with it!
- Yoda
No Problem im doing this for the Community bcs your all nice guysthanks for sharing!