Raised This Month: $32 Target: $400
 8% 

Alone MapChange


Post New Thread Reply   
 
Thread Tools Display Modes
Author
graczu
Senior Member
Join Date: Mar 2006
Plugin ID:
149
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Plugin checking are there players on current map, if current players <= 2, plugin changing map to specificated by cvar.
    Unapprover:
    Reason for Unapproving:
    Duplicate of existing plugin
    Old 08-23-2007 , 04:11   Alone MapChange
    Reply With Quote #1

    Simple plugin that change map if Current Players <= 2, on the map that admin set up in Cvar.

    Cvars:

    sm_alone_map = "" // MapName (Default: 3mc_training)
    sm_alone_time = 120 // Time after mapchange to check the players count. (Default: 120 sec., Min: 30, Max: 300 (we don't want long task's))

    SourceCode:
    http://paste.hopto.org/index.php?8

    Default Map you can download here:
    http://www.fpsbanana.com/maps/12229
    Attached Files
    File Type: sp Get Plugin or Get Source (alone_map.sp - 972 views - 1.4 KB)
    __________________

    Last edited by graczu; 08-23-2007 at 04:22.
    graczu is offline
    dalto
    Veteran Member
    Join Date: Jul 2007
    Old 08-23-2007 , 10:04   Re: Alone MapChange
    Reply With Quote #2

    Nice plugin, a couple of thoughts.
    • You don't need to use FindConVar to find cvar's you create, you can keep a handle the the same way you do for you other cvar.
    • Is "/mapchange" a standard command? I think just "map" would work.
    • There is no real reason for g_szmap to be global since you overwrite it in the function everytime. You might want to consider keeping it local.
    • InsertServerCommand() can format a string itself. You could just call InsertServerCommand("map %s", szmap);
    I hope that helps!
    dalto is offline
    graczu
    Senior Member
    Join Date: Mar 2006
    Old 08-23-2007 , 18:37   Re: Alone MapChange
    Reply With Quote #3

    Thanks, im new in writing plugins on SM, so evry leason is important for me .

    I will update plugin tomorow.

    - I will add: no change if current map == sm_alone_map.
    __________________
    graczu is offline
    Phischy
    New Member
    Join Date: Aug 2007
    Old 08-26-2007 , 12:38   Re: Alone MapChange
    Reply With Quote #4

    Does this plugin put up a vote or does it simply change it to a random map on you?
    Phischy is offline
    graczu
    Senior Member
    Join Date: Mar 2006
    Old 08-26-2007 , 16:08   Re: Alone MapChange
    Reply With Quote #5

    It's simply change the map. I will update it, when i finish rank system.
    __________________
    graczu is offline
    Lindgren
    Member
    Join Date: Jul 2007
    Location: Sweden
    Old 08-27-2007 , 07:10   Re: Alone MapChange
    Reply With Quote #6

    This plugin already exists as approved and working.
    http://forums.alliedmods.net/showthread.php?t=57734
    Lindgren is offline
    Send a message via MSN to Lindgren
    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 11:34.


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