Results 1 to 11 of 11
  1. #1
    ch40s's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    34
    Reputation
    10
    Thanks
    6

    [Solved]something like onPlayerDisconnect()?

    Hey there,
    so i want to set the same killstreaks for each player. I've done that with setPlayerData().
    Of course i saved the original values for each player before changing it, so i could restore them. The problem is, i don't know when to call the restore function. When i "force" it manually, the code works, but i want it to automatically get called when a player leaves the game, or the game ends (not sure if this counts as the same, since the player leaves the game when it ends).
    So i tried something like:
    Code:
    restore()
    {
        for(;;)
        {
            level waittill( "disconnected", player);
            player restoreKillstreaks();
        }
    }
    where restore() gets called as a level thread on host connect (it works if i set it to waittill onplayercommand(blabla) ).
    This is also how the onPlayerDisconnect function is written (forgot in what gsc, but i think it is in skill.gsc for example)
    I also tried
    Code:
    level waittill_any("disconnected","disconnect","leaving","game_ended");
    But that does not work either.
    The only that is working, is when the game ends (it ends under special circumstances), with
    Code:
    level thread maps\mp\gametypes\_gamelogic::forceEnd();
    foreach(player in level.players)
    	player restoreKillstreaks();
    Anyone got ideas on how to accomplish this?

    thx
    greetz
    Last edited by Blubb1337; 10-01-2010 at 03:04 AM.

  2. #2
    [WhA]4FunPlayin's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    Not here
    Posts
    757
    Reputation
    8
    Thanks
    169
    My Mood
    Lonely
    When a player disconnects (waittill("disconnect");), you can't do anything to him, he is not connected, how can you change something for someone that is not connected.
    That is the reason why it doesn't work, for how to make it work, sorry can't answer, dunno.

  3. #3
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy
    Code:
    level waittill( "game_ended" );
    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]

  4. #4
    ch40s's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    34
    Reputation
    10
    Thanks
    6
    @master131
    that does not work when the player leaves before the game is over, so he hast to rest his killstreaks manually.
    But there has to be some kind of notification for the game when the player leaves, since a player is erased from the scoreboard when he leaves.
    level waittill("leaving") or level waittill("leaving", player) does not work either, althoug the neccessaray notifactions exists(found it in
    waittill_any( "crashing", "leaving" ) in file: _airdrop.gsc )

    there has to be a method for this

    ty


    edit: i thought a bit, and my "gets erased from scoreboard" was no argument since the game will just wait for a disconnect notification and then look for who is still in the game (level.players) and erase every other entry.
    So the only solution might be to catch a menuresponse and look if it was disconnect.
    But thats not satisfying, since if the server crashes or i force ending the game, or the player disconnects via console, he will remain with "hacked" killstreaks....hmmm
    Last edited by ch40s; 09-29-2010 at 05:52 AM.

  5. #5
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy
    Well the game has no way of predicting when a player leaves. The time period between leaving and disconnecting is too small so it's not possible.
    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]

  6. #6
    ch40s's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    34
    Reputation
    10
    Thanks
    6
    ok then..
    so is there a way to set all killstreaks the same for each player, without using setPlayerData, so that they are normal for the player when he connects to another server?

    Thanks guys

  7. #7
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy
    Well I'm not sure because I've personally haven't changed killstreaks before. Maybe ask AZUMIKKEL?
    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]

  8. #8
    ch40s's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    34
    Reputation
    10
    Thanks
    6
    yes there is
    Code:
    self maps\mp\gametypes\_class::setKillstreaks( ks1,ks2,ks3 )

  9. #9
    bomb21's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Unknown
    Posts
    57
    Reputation
    10
    Thanks
    22
    Code:
    for(;;)
    {
    level waittill("disconnect", player);//disconnect or disconnected (forgot)
    
    player doStuff();
    }

  10. #10
    ch40s's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    34
    Reputation
    10
    Thanks
    6
    @bomb21
    read my first post, already tried that
    does not work.
    Anyways found a workaround with the
    Code:
    self maps\mp\gametypes\_class::setKillstreaks( ks1,ks2,ks3 )
    method, so this is solved.

    thx

  11. #11
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    /marked as solved



Similar Threads

  1. Requesting Something Like This..
    By Uno in forum Help & Requests
    Replies: 5
    Last Post: 08-23-2009, 04:00 PM
  2. TO: Weasles or something like that lol + more
    By jeffchan666 in forum Combat Arms Hacks & Cheats
    Replies: 2
    Last Post: 08-14-2009, 10:25 PM
  3. Is there something like Winrar
    By vonjoebob in forum Debate Fort
    Replies: 9
    Last Post: 06-15-2009, 09:47 AM
  4. how do i make something like this ?
    By Gold Stone in forum Visual Basic Programming
    Replies: 12
    Last Post: 01-12-2008, 06:26 AM
  5. help!! i need hack tools something like this....
    By kapo in forum MapleStory Hacks, Cheats & Trainers
    Replies: 0
    Last Post: 01-11-2008, 04:16 PM