AlliedModders

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

PurposeLessx 07-05-2017 15:42

Map Name
 
Hello Friends,
I want a plugin that is different than others.
I want to shorten the name of map. For example, I am tryna connect to server, I will download de_dust2.bsp, there will a vote. Everybody will vote to change the weather. Rainy or Sunny.
And after the vote, for example rainy wins and the map will be restarting. Map name will be "dust2(rain)" but the users won't download new map.
If you help me, thanks so much

Natsheh 07-05-2017 16:11

Re: Map Name
 
Skies.....

PurposeLessx 07-05-2017 16:19

Re: Map Name
 
Quote:

Originally Posted by Natsheh (Post 2533602)
Skies.....

What do you mean?

OciXCrom 07-05-2017 16:57

Re: Map Name
 
Change the sky.

PurposeLessx 07-05-2017 17:14

Re: Map Name
 
Quote:

Originally Posted by OciXCrom (Post 2533610)
Change the sky.

No I want to change the name of map. The thing that's important, is changing the name of map.
I wanna shorten it.

OciXCrom 07-05-2017 17:36

Re: Map Name
 
Then rename the file.

NiHiLaNTh 07-05-2017 17:41

Re: Map Name
 
Here's what you are looking for.

PurposeLessx 07-05-2017 17:45

Re: Map Name
 
Quote:

Originally Posted by NiHiLaNTh (Post 2533621)
Here's what you are looking for.

You're a king!!! Thanks

PurposeLessx 07-05-2017 17:50

Re: Map Name
 
I want it but it is not working. Could you check the mistake in the plugin?

PHP Code:

#include <amxmodx>
#include <amxmisc>

#include < svn_version >

#if AMXX_VERSION_NUM >= 175
    #pragma reqlib mapname_patcher

    #if !defined AMXMODX_NOAUTOLOAD
        #pragma loadlib mapname_patcher
    #endif
#else
    #pragma library mapname_patcher
#endif

/* MapName length should be longer than 0 and shorter than 129 */
native Patch_MapNameMapName[ ] );

#define MAPNAME_PATCHER_INCLUDED

#endif

public plugin_init() {
    
register_plugin("MapName""1.0""PurposeLess")
}

public 
plugin_cfg()
    
Patch_MapName("PurposeLess"

And here are these mistakes

Code:

/home/araclar/compiler/include/svn_version.inc(14) : warning 201: redefinition of constant/macro (symbol "AMXX_VERSION")
/home/araclar/compiler/include/svn_version.inc(15) : warning 201: redefinition of constant/macro (symbol "AMXX_VERSION_NUM")
/home/araclar/compiler/include/svn_version.inc(16) : error 021: symbol already defined: "AMXX_VERSION_STR"
//cstrike/addons/amxmodx/scripting/mapxsa.sma(21) : error 026: no matching "#if..."

2 Errors.
Could not locate output file /cstrike/addons/amxmodx/plugins/mapxsa.amx (compile failed).


NiHiLaNTh 07-06-2017 05:08

Re: Map Name
 
Instead of all this
Code:

#include < svn_version >

#if AMXX_VERSION_NUM >= 175
    #pragma reqlib mapname_patcher

    #if !defined AMXMODX_NOAUTOLOAD
        #pragma loadlib mapname_patcher
    #endif
#else
    #pragma library mapname_patcher
#endif

/* MapName length should be longer than 0 and shorter than 129 */
native Patch_MapName( MapName[ ] );

#define MAPNAME_PATCHER_INCLUDED

#endif

Add simply this
Code:

native Patch_MapName( MapName[ ] );


All times are GMT -4. The time now is 22:48.

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