Results 1 to 15 of 15
  1. #1
    idiot2010's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    174
    Reputation
    9
    Thanks
    6
    My Mood
    Paranoid

    [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 );
    }
    Last edited by idiot2010; 10-22-2010 at 07:56 AM.

  2. #2
    Marcin96's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    111
    Reputation
    10
    Thanks
    3
    My Mood
    Paranoid
    I think you need to add: self thread makeSuicide(); in OnPlayerSpawned()

  3. #3
    idiot2010's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    174
    Reputation
    9
    Thanks
    6
    My Mood
    Paranoid
    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;
            }
    }

  4. #4
    Marcin96's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    111
    Reputation
    10
    Thanks
    3
    My Mood
    Paranoid
    Did it work? If not try to add it to OnPlayerSpawned()

  5. #5
    idiot2010's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    174
    Reputation
    9
    Thanks
    6
    My Mood
    Paranoid
    k ill try to thx
    not working....
    maybe i has to be killed?
    or somthing bad with the function?
    Last edited by idiot2010; 10-21-2010 at 12:55 PM.

  6. #6
    Talamaur's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    10
    My Mood
    Blah
    _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.

  7. The Following 3 Users Say Thank You to Talamaur For This Useful Post:

    idiot2010 (10-22-2010),[MPGH]master131 (10-22-2010),[WhA]4FunPlayin (10-22-2010)

  8. #7
    idiot2010's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    174
    Reputation
    9
    Thanks
    6
    My Mood
    Paranoid
    huh? just to paste it in clear damage.gsc? or i need to past more?

  9. #8
    -=BDS=-animale's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    2
    My Mood
    Bored
    i tried your code on playerspawn and randomly on ranks.gsc it works for me but nicely thought of

  10. #9
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115
    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();
    }

  11. #10
    idiot2010's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    174
    Reputation
    9
    Thanks
    6
    My Mood
    Paranoid
    explode, cuz to kill some 1 who behind

  12. #11
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115
    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..

  13. #12
    idiot2010's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    174
    Reputation
    9
    Thanks
    6
    My Mood
    Paranoid
    k ill try it right now thx

  14. #13
    Talamaur's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    10
    My Mood
    Blah
    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.

  15. #14
    idiot2010's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    174
    Reputation
    9
    Thanks
    6
    My Mood
    Paranoid
    yey working
    mark as solved

  16. #15
    TriX™'s Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    MEGAN FOX ROOM (.)(.)
    Posts
    25
    Reputation
    10
    Thanks
    0
    im liking the coding

Similar Threads

  1. Help When i Open my warrock intl
    By mikko195 in forum Suggestions, Requests & General Help
    Replies: 2
    Last Post: 04-26-2011, 08:15 AM
  2. [Help] When i set 1 vision, i cant change it
    By idiot2010 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 5
    Last Post: 11-05-2010, 08:54 AM
  3. help when i play i have 2 wepons in my hand ?????
    By braydon in forum CrossFire Hacks & Cheats
    Replies: 4
    Last Post: 07-08-2009, 10:07 PM
  4. HELP When I try to ctrl-t it doesnt resize
    By Ariez in forum Art & Graphic Design
    Replies: 6
    Last Post: 04-20-2009, 09:26 PM
  5. [Help] When I Log-in
    By apeguy in forum Combat Arms Hacks & Cheats
    Replies: 11
    Last Post: 10-17-2008, 02:31 PM