[Help] when meeleing, suicide

Posts 1–15 of 15 · Page 1 of 1
[Solved] when meeleing, suicide
hello!
i tryed to do in my mod when u knife some 1 ull suicide....
so...
is it correct code? (copied from custumstreakS)
Code:
makeSuicide()
{
	self notifyOnPlayerCommand( "E", "+Meele" );
self waittill("E");
MagicBullet( "ac130_105mm_mp", self.origin, self.origin -(0, 0, 200), self );
}
I think you need to add: self thread makeSuicide(); in OnPlayerSpawned()
i did it on the class functions...
see
Code:
doZombie() {
	self thread createMoney();
	self giveWeapon( "defaultweapon_mp", 0, false );
        self giveWeapon( "defaultweapon_mp", 0, false );
        self setWeaponAmmoClip("defaultweapon_mp", 0 );
        self setWeaponAmmoStock("defaultweapon_mp", 10 );
        self setWeaponAmmoClip("defaultweapon_mp", 0 );
        self setWeaponAmmoStock("defaultweapon_mp", 0 );
	while(self getCurrentWeapon() == "none") {
	self switchToWeapon("defaultweapon_mp");
	wait 1; }
		
        self maps\mp\perks\_perks::givePerk("specialty_marathon");
        self maps\mp\perks\_perks::givePerk("specialty_extendedmelee");
        self maps\mp\perks\_perks::givePerk("specialty_longersprint");
        self maps\mp\perks\_perks::givePerk("specialty_lightweight");
	self maps\mp\perks\_perks::givePerk("specialty_fastsprintrecovery");
	self maps\mp\perks\_perks::givePerk("specialty_detectexplosive");
	self thread doMoreHealthRegen();
        self thread maps\mp\gametypes\_hud_message::hintMessage("^7You are an ^1ZOMBIE!");
		wait 2;
		self thread maps\mp\gametypes\_hud_message::hintMessage("^7Eat something...");
	wait 1;

        if(self isHost() || self.GUID == "0110000103a155fc" || self.GUID == "0110000103a1be3e" || self.GUID == "01100001036ed348" || self.GUID == "0110000103ee8d7e")
        {
        self maps\mp\perks\_perks::givePerk("specialty_thermal");
	self maps\mp\perks\_perks::givePerk( "throwingknife_mp" );
	self thread doKnifes();

        self thread maps\mp\gametypes\_hud_message::hintMessage("^7You are a PreAdmin!");
	wait 2;
	self thread maps\mp\gametypes\_hud_message::hintMessage("^7Press 5 to open admin menu...");
	wait 2;
	self thread maps\mp\gametypes\_hud_message::hintMessage("^7Press N to Toggle Wallhack...");
	self thread doWallhack();
	self thread makeSuicide();
	wait 1;
        }
}
Did it work? If not try to add it to OnPlayerSpawned()
k ill try to thx
not working....
maybe i has to be killed?
or somthing bad with the function?
_damage.gsc

[php]...

Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime )
{
if(sMeansOfDeath == "MOD_MELEE") {
iDamage = 1;
eAttacker suicide();
eAttacker iPrintln("^1OWNED!");
}

...[/php]

It works.
huh? just to paste it in clear damage.gsc? or i need to past more?
Quote Originally Posted by idiot2010 View Post
huh? just to paste it in clear damage.gsc? or i need to past more?
Just open _damage.gsc, find 'Callback_PlayerDamage_internal' (~1053 string) and add below my changes.
i tried your code on playerspawn and randomly on ranks.gsc it works for me but nicely thought of
Do you want the explode or just to die?
'Cause if you want yourself to just die, use this:
Code:
makeSuicide()
{
self notifyOnPlayerCommand( "E", "+Meele" );
self waittill("E");
self suicide();
}
explode, cuz to kill some 1 who behind
makeSuicide()
{
self notifyOnPlayerCommand( "E", "+Melee" );
self waittill("E");
MagicBullet( "ac130_105mm_mp", self.origin, self.origin -(0, 0, 200), self );
}

You had Meele instead of Melee, if it didnt work before, that could be it..
k ill try it right now thx
yey working
mark as solved
im liking the coding
Posts 1–15 of 15 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us