AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Run-time functions (https://forums.alliedmods.net/showthread.php?t=194554)

Sutar 08-29-2012 07:11

Run-time functions
 
I have a great script, but the problem is to run the function (map_times), the time code on the map, have 1 minute or less.

Code:

#include <amxmodx>

public plugin_init()
{
        register_plugin("Test", "1.0", "Author")
}

public map_times()
{
...
}

How to do it?

But, I have a plugin - the extension of the map.
I need to get a new mp_timelimit before running the function.

For example:
Before the end of the map, there were 5 minutes.
I extended for 15 more minutes

Code:

set_pcvar_float(get_cvar_pointer("mp_timelimit"), get_pcvar_float(get_cvar_pointer("mp_timelimit")) + 20.0)
After that, the card is left to the end of 20 minutes.
And after 20 minutes, start function (map_times)


All times are GMT -4. The time now is 05:51.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.