Results 1 to 11 of 11

Threaded View

  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.

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