Thread: Imessages, Hook to map change, changelevel, nextmap

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    9

    Imessages, Hook to map change, changelevel, nextmap

    Hello,

    I am trying to replace some functionality that amxmodx gave me with new angel script. I am an experienced programming, but without a list of exposed funcions, i am having trouble figuring out how to do some of the things i want to do.

    So there goes a few questions:

    1- Is it possible to show a colored big text message with angelscript as i did with amx_imessages? what is the funtion to generate such text?

    2- How can i hook my server wide angel script to the map change event?

    EDIT: i think found it in Vox.as
    g_Hooks.RegisterHook( Hooks::Game::MapChange, @MapChange );
    Also i think for what i see in Yell.as that you can simply do a "MapInit()" function, and it will be executed when map is changed

    3- Can i trigger a map change from angel script? how?
    EDIT: Got it:
    g_EngineFuncs.ChangeLevel(szMapName);
    4- Can i read and write cvars? how?

    EDIT: found it in Survival.as
    @m_pSurvivalEnabled = CCVar( "survival_enabled", 1, "Controls whether survival mode is enabled or disabled", ConCommandFlag::None, CVarCallback( this.SurvivalEnabledCB ) );
    EDIT 2: Uhm... i think the previous one is for creating a custom cvar. I believe that if you want to read an engine cvar you can use:
    g_EngineFuncs.CVarGet*
    5- How can i get the ping of a given player?

    Thank you very much!
    Nevermore
    Last edited by Nevermore; 25-01-2016 at 03:16 PM.

  2. #2
    func_vehicle enthusiaist w00tguy123's Avatar
    Join Date
    Dec 2006
    Location
    U.S. West
    Posts
    1,599

    Re: Imessages, Hook to map change, changelevel, nextmap

    Looks like this is your only unanswered question:
    Quote Originally Posted by Nevermore View Post
    5- How can i get the ping of a given player?
    I don't think this is possible yet. I suspect there are some functions related to networking that aren't exposed. The only network-specific code we have access to is NetworkMessage which doesn't do anything on its own.
    See below
    Last edited by w00tguy123; 27-01-2016 at 08:55 PM. Reason: I didn't ctrl+f hard enough
    Love,
    w00tguy

  3. #3
    Banned Solokiller's Avatar
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    3,314

    Re: Imessages, Hook to map change, changelevel, nextmap

    CEngineFuncs::GetPlayerStats.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •