Raised This Month: $ Target: $400
 0% 

mp_timelimit to 0:00 ? why...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZerroQ
Member
Join Date: Jun 2006
Location: European Union: Latvia
Old 01-21-2007 , 18:42   mp_timelimit to 0:00 ? why...
Reply With Quote #1

You see, i tryed to do an plugin that whould show some advertisment and information at the end of each map, it shows the info, but it turns the mp_timelimit to zero ( 0 ) and the map does not change...

Got Any Ideas why ?.. Please help me out!

Code:
#include <amxmodx>

new CurrentTime[9]
new g_nextMap[32]

#define TASK_ID_CHECKFORMAPEND 241

public plugin_init()
{
	register_plugin("Kartes Beigu Teksts", "0.1 b3ta" ,"ZerroQ")
	set_task(15.0,"Task_MapEnd",TASK_ID_CHECKFORMAPEND,_,_,"d",1)
}

getNextMapName(szArg[], iMax)
{
	new len = get_cvar_string("amx_nextmap", szArg, iMax)
	
	if (is_map_valid(szArg)) return len
	len = copy(szArg, iMax, g_nextMap)
	set_cvar_string("amx_nextmap", g_nextMap)
	
	return len
}

public Task_MapEnd()
{
	if(get_playersnum())
	{
		client_print(0,3,"[CS.Boldnet] Kartes laika limits iztecejis.")
		get_time("%H:%M:%S",CurrentTime,8)
		get_mapname("name[0]",10)
		client_print(0,3,"[CS.Boldnet] Pareizs Laiks ir: %s",CurrentTime)
		new name[32]
		getNextMapName(name, 31)
		client_print(0,3,"[CS.Boldnet] Sekojosa karte bus: %s ",name)
		client_print(0,3,"[CS.Boldnet] mIRC serveris: chat.118.lv / Istaba: #cs.boldnet")
		engclient_print(0,engprint_center, "Pateicamies, ka spelejat!^nUzgaidiet lidz ieladejas [ %s ].",name)
		client_print(0,3,"[CS.Boldnet] Pieversies musu web portalinam: http://cs.boldnet.lv")
		client_print(0,3,"[CS.Boldnet] Serveris ielade karti! Uzgaidiet...")
	}
}
__________________
* we Create our own fate...
ZerroQ is offline
Send a message via Skype™ to ZerroQ
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-21-2007 , 22:35   Re: mp_timelimit to 0:00 ? why...
Reply With Quote #2

Code:
get_mapname("name[0]",10)
I think this is causing some memory overflow problems... probably.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS

Last edited by XxAvalanchexX; 01-22-2007 at 15:09.
XxAvalanchexX is offline
osk522
BANNED
Join Date: Dec 2006
Location: Slöinge, Falkenberg, Hal
Old 01-22-2007 , 11:50   Re: mp_timelimit to 0:00 ? why...
Reply With Quote #3

I don't realy understand what you mean, but maybe this can help you:

register_event("30", "change_level_event", "a")

It will trigger change_level_event() when it's time to change map (when you can't move, scores are being displayed..).
osk522 is offline
Send a message via MSN to osk522
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:19.


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