AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Prevmaps (https://forums.alliedmods.net/showthread.php?t=117299)

4iriks 01-30-2010 19:11

Prevmaps
 
Hello , i wanted to know , what i must change here to see 5 previous maps , and must type /prevmaps not prevmap to see previous maps :) ty

Code:

#include <amxmodx>

public plugin_init()
{
    register_plugin("PrevMap", "1.0", "neuromancer")
    register_dictionary("prevmap.txt")
    register_clcmd("say prevmap", "sayPrevMap", 0, "- displays prevmap")
   
    new lmapn[32];
    get_localinfo("lmapn", lmapn, 31)
    set_localinfo("pmapn", lmapn)

    set_task(1.0, "setinfo")
}

public setinfo()
{
    new mapname[32]
    get_mapname(mapname, 31)
    set_localinfo("lmapn", mapname)
}

public sayPrevMap()
{
    new pmapn[32]
    get_localinfo("pmapn", pmapn, 31)
    if(equal(pmapn, ""))
    {
        client_print(0, print_chat, "%L", LANG_PLAYER, "NO_PREV_MAP")
    }
    else
    {
        client_print(0, print_chat, "%L: %s", LANG_PLAYER, "PREV_MAP", pmapn)
    }
}


Jack86 01-30-2010 20:43

Re: Prevmaps
 
http://forums.alliedmods.net/showthread.php?t=64680


All times are GMT -4. The time now is 07:21.

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