.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Ideas (http://forums.bots-united.com/forumdisplay.php?f=50)
-   -   Mapname to lower case (http://forums.bots-united.com/showthread.php?t=4908)

teame06 22-03-2006 07:14

Re: Mapname to lower case
 
I have added the code to amx_map all you need to do is change the function in admincmd.sma to this one. (If you do changelevel de_dust) Then this won't work, but if you do it from amxx then this will work.

And what Kwo said is true. Linux has a case senstivity file system. You can actually have like file GABEN.jpg GABEN.JPG etc etc ..

Code:

public cmdMap(id, level, cid)
{
    if (!cmd_access(id, level, cid, 2))
        return PLUGIN_HANDLED

    new arg[32]
    new arglen = read_argv(1, arg, 31)
   
    strtolower(arg) // Added to fixed that problem
   
    if (!is_map_valid(arg))
    {
        console_print(id, "[AMXX] %L", id, "MAP_NOT_FOUND")
        return PLUGIN_HANDLED
    }

    new authid[32], name[32]
   
    get_user_authid(id, authid, 31)
    get_user_name(id, name, 31)
   
    switch (get_cvar_num("amx_show_activity"))
    {
        case 2: client_print(0, print_chat, "%L", LANG_PLAYER, "ADMIN_MAP_2", name, arg)
        case 1: client_print(0, print_chat, "%L", LANG_PLAYER, "ADMIN_MAP_1", arg)
    }
   
    log_amx("Cmd: ^"%s<%d><%s><>^" changelevel ^"%s^"", name, get_user_userid(id), authid, arg)
   
    new _modName[10]
    get_modname(_modName, 9)
   
    if (!equal(_modName, "zp"))
    {
        message_begin(MSG_ALL, SVC_INTERMISSION)
        message_end()
    }
   
    set_task(2.0, "chMap", 0, arg, arglen + 1)
   
    return PLUGIN_HANDLED
}



All times are GMT +2. The time now is 12:05.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.