Results 1 to 9 of 9
  1. #1
    Talamaur's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    10
    My Mood
    Blah

    can't destroy element

    Hello guys.

    I have a problem. I made little test mod to do something.
    When you kill someone you got an icon at topright. It works.
    After death Icon will destroyed. But it doesn't work.

    _rank.gsc
    [php]#include <...>

    displayIcon()
    {
    self endon("disconnect");
    self endon("death");

    self waittill("killed_enemy");
    self iPrintlnBold("^1Ta-da!");
    pr8_icon = createIcon("rank_prestige8", 40, 40);
    pr8_icon setPoint("CENTER", "TOPRIGHT", -50, 50);
    pr8_icon.hideWhenInMenu = true;
    pr8_icon.foreground = true;
    }

    destroyIcon()
    {
    self endon("disconnect");

    for(;
    {
    self waittill("death");
    self.pr8_icon destroyElem();
    wait 1;
    }
    }

    init()
    {
    <...>

    precacheShader("white");
    precacheShader("rank_prestige8");

    <...>
    }

    <...>

    onPlayerSpawned()
    {
    self endon("disconnect");

    for(;
    {
    self waittill("spawned_player");
    self thread displayIcon();
    self thread destroyIcon();
    }
    }

    <...>
    [/php]

    Sorry for lame english. I hope you understand me.

  2. #2
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy
    Code:
    destroyIcon()
    {
        self waittill("death");
        self.pr8_icon destroy();
    }
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  3. The Following User Says Thank You to master131 For This Useful Post:

    Talamaur (10-24-2010)

  4. #3
    Talamaur's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    10
    My Mood
    Blah
    Still not destroyed after death.

    Someone can help me? I don't know why master131's solution didn't work. While creating this create-destroy-icon I took the example from Hide and Seek mod. It works there but not here.
    Last edited by Blubb1337; 10-25-2010 at 09:39 AM.

  5. #4
    Shucker's Avatar
    Join Date
    May 2009
    Gender
    male
    Posts
    442
    Reputation
    16
    Thanks
    311
    My Mood
    Fine
    Code:
    destroyIcon() 
    { 
        self endon("disconnect"); 
         
        for(;;) 
        { 
            self waittill("death"); 
            pr8_icon destroy();
        } 
    }

  6. The Following User Says Thank You to Shucker For This Useful Post:

    Talamaur (10-25-2010)

  7. #5
    Talamaur's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    10
    My Mood
    Blah
    Quote Originally Posted by Shucker View Post
    Code:
    destroyIcon() 
    { 
        self endon("disconnect"); 
         
        for(;;) 
        { 
            self waittill("death"); 
            pr8_icon destroy();
        } 
    }
    Thx but I tried this and got an error "uninitialized pr8_icon".

  8. #6
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    166
    My Mood
    Angelic
    [php]#include <...>

    displayIcon()
    {
    self endon("disconnect");
    self endon("death");

    self waittill("killed_enemy");
    self iPrintlnBold("^1Ta-da!");
    pr8_icon = createIcon("rank_prestige8", 40, 40);
    pr8_icon setPoint("CENTER", "TOPRIGHT", -50, 50);
    pr8_icon.hideWhenInMenu = true;
    pr8_icon.foreground = true;
    self waittill("death");
    pr8_icon destroy();
    wait 1;
    }

    init()

    {
    <...>

    precacheShader("white");
    precacheShader("rank_prestige8");

    <...>
    }

    <...>

    onPlayerSpawned()
    {
    self endon("disconnect");

    for(;
    {
    self waittill("spawned_player");
    self thread displayIcon();
    }
    }

    <...>

    [/php]

  9. The Following User Says Thank You to mathieutje12 For This Useful Post:

    Talamaur (10-25-2010)

  10. #7
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Avoid doubleposting

    /Merged



  11. The Following User Says Thank You to Blubb1337 For This Useful Post:

    Talamaur (10-25-2010)

  12. #8
    Imthebosss's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    In modding world :D
    Posts
    241
    Reputation
    21
    Thanks
    132
    My Mood
    Drunk

    Exclamation

    This should work actually. Did you do this in the onPlayerSpawned():
    Code:
    self thread destroyIcon();


    Quote Originally Posted by Talamaur View Post
    Thx but I tried this and got an error "uninitialized pr8_icon".
    Do you need a signature? I will make it! Send me a PM =)



  13. The Following User Says Thank You to Imthebosss For This Useful Post:

    Talamaur (10-25-2010)

  14. #9
    Talamaur's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    10
    My Mood
    Blah
    Thank you guys for your answers. I solved the problem yourself. Realy wierd for me.

    [php]#include <...>

    displayIcon()
    {
    self endon("disconnect");
    self endon("death");

    self waittill("killed_enemy");
    self iPrintlnBold("^1Ta-da!");
    self.pr8_icon = createIcon("rank_prestige8", 40, 40);
    self.pr8_icon setPoint("CENTER", "TOPRIGHT", -50, 50);
    self.pr8_icon.hideWhenInMenu = true;
    self.pr8_icon.foreground = true;
    }

    destroyIcon()
    {
    self endon("disconnect");

    self waittill("death");
    if(isDefined(self.pr8_icon))
    {
    self.pr8_icon destroyElem();
    }
    }

    init()
    {
    <...>

    precacheShader("white");
    precacheShader("rank_prestige8");

    <...>
    }

    <...>

    onPlayerSpawned()
    {
    self endon("disconnect");

    for(;
    {
    self waittill("spawned_player");
    self thread displayIcon();
    self thread destroyIcon();
    }
    }

    <...> [/php]

    I missed "self" before "pr8_icon".

Similar Threads

  1. How to Destroy the Earth With a Coffee Can
    By Nismo in forum General
    Replies: 12
    Last Post: 09-25-2011, 07:52 PM
  2. Can one do Search and Destroy Marks?
    By marc101 in forum CrossFire Mods & Rez Modding
    Replies: 3
    Last Post: 05-04-2010, 02:13 AM
  3. Can we post godmode for gunz
    By rock1988 in forum Gunz General
    Replies: 24
    Last Post: 02-09-2006, 10:51 PM
  4. Can Anybody Hack The Mu Online.....
    By boneslapz in forum General Gaming
    Replies: 3
    Last Post: 01-05-2006, 04:05 AM
  5. Vehicle Stealing and Vehicle auto-destroy in Havana
    By Zededarian in forum Game Hacking Tutorials
    Replies: 0
    Last Post: 01-02-2006, 04:34 PM