Raised This Month: $51 Target: $400
 12% 

Map doesn't change


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
reinert
Veteran Member
Join Date: Feb 2007
Old 10-09-2011 , 08:14   Map doesn't change
Reply With Quote #1

PHP Code:
new NextMap[33];
new 
bool:MapChange false;

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("amx_map""CmdMap"0)
    
register_logevent("RoundEnded"2"1=Round_End")
}

public 
CmdMap(idlevelcid)
{
    if(!
cmd_access(idlevelcid2)
        return 
PLUGIN_HANDLED

    
new arg_str[33],arg_num
    read_argv
(1,arg_str,32)
    
MapChange true;
    
copy(NextMap32arg_str)
}

public 
RoundEnded()
{
    if(
MapChange)
    {
        
server_cmd("changelevel %s"NextMap)
    }

Where is the problem ? I want to make when admin changes map, the map will be changed only on round end, not instantly.
reinert is offline
Stereo
Veteran Member
Join Date: Dec 2010
Old 10-09-2011 , 09:33   Re: Map doesn't change
Reply With Quote #2

Try with register_concmd
Stereo is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 10-09-2011 , 09:58   Re: Map doesn't change
Reply With Quote #3

Well it's not the problem, I just gave you example, actually I'm getting the map by say command: !map map_name. Everything works when I change map instantly, but it's not how I want.
reinert is offline
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 10-09-2011 , 10:03   Re: Map doesn't change
Reply With Quote #4

Did you delete the "amx_map" command from "admincmd" plugin ?
dFF is offline
Stereo
Veteran Member
Join Date: Dec 2010
Old 10-09-2011 , 10:10   Re: Map doesn't change
Reply With Quote #5

Try

PHP Code:
#include <amxmodx>
#include <amxmisc>

new NextMap[33];
new 
bool:MapChange false;

public 
plugin_init()
{
    
register_clcmd("!map""CmdMap"ADMIN_KICK)
    
register_logevent("endround"2"0=World triggered""1=Round_End")
}

public 
CmdMap(idlevelcid)
{
    if(!
cmd_access(idlevelcid2) )
        return 
PLUGIN_HANDLED
    
    
new arg_str[33]
    
read_argv(1,arg_str,32)
    
MapChange true;
    
copy(NextMapcharsmax(NextMap), arg_str)
    return 
PLUGIN_CONTINUE
}

public 
endround()
{
    if(
MapChange)
    {
        
server_cmd("changelevel %s"NextMap)
    }

Stereo is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 10-09-2011 , 10:16   Re: Map doesn't change
Reply With Quote #6

I don't see what you changed, and I'm almost sure that I'm more knowledged in pawn than you are. And I very doubt that you understood what I wrote before.
reinert is offline
Stereo
Veteran Member
Join Date: Dec 2010
Old 10-09-2011 , 10:20   Re: Map doesn't change
Reply With Quote #7

I only want help you...

PHP Code:
copy(NextMapcharsmax(NextMap), arg_str
Stereo is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 10-09-2011 , 10:21   Re: Map doesn't change
Reply With Quote #8

Yea, I can see that, but you can't help when you don't know how to.
reinert is offline
t3hNox
Senior Member
Join Date: Oct 2009
Old 10-09-2011 , 10:53   Re: Map doesn't change
Reply With Quote #9

Just add server_exec() after server_cmd().
t3hNox is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 10-09-2011 , 11:03   Re: Map doesn't change
Reply With Quote #10

well it's not the best way to do this. Still need help !
reinert is offline
Reply



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 14:28.


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