Raised This Month: $ Target: $400
 0% 

Handling information with set_task


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
reinert
Veteran Member
Join Date: Feb 2007
Old 04-21-2011 , 04:32   Handling information with set_task
Reply With Quote #1

Hey, I've a code like when admin types !map <map_name> it should changelevel after 5seconds so its like:

PHP Code:
if(equali(cmd"!map"))
    {
        if(
is_map_valid(rest))
        {
            
set_task(5.0"NextMap"555rest)
            
client_printc(0"!g[ CLAN MATCH ]!n Switching map to %s"rest)
        }
        else
        {
            
client_printc(id"!g[ CLAN MATCH ]!n Map %s isn't valid"rest)
        }
        return 
PLUGIN_HANDLED_MAIN;
    }

public 
NextMap(MapName[])
{
    
server_cmd("changelevel %s"MapName)

But it's not working. ( If I try to change it manually with changelevel de_dust2, then it works... )
reinert is offline
 



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 19:47.


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