Raised This Month: $51 Target: $400
 12% 

Multimod Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 08-22-2009 , 10:44   Re: Multimod Plugin
Reply With Quote #71

Quote:
Originally Posted by KadiR View Post
example:

you have uwc3 and warcraft on ur server (multimod)

if you want to play uwc3 in dust2, u must rename (nominate) uwc3_dust2 and for wc3 wc3_dust2
No, you can configure a different map list for each mod.
A map list is a file with the list of maps.
You can put wc3_dust2 in each file without problem.
joropito is offline
Send a message via MSN to joropito
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-25-2009 , 20:49   Re: Multimod Plugin
Reply With Quote #72

What happened here:

PHP Code:
    register_cvar("amx_nextmod""")
    
register_cvar("amx_mm_mintime""10")
    
register_cvar("amx_mm_extendmap_max""90")
    
register_cvar("amx_mm_extendmap_step""15")
    
    
gp_nextmod get_cvar_pointer("amx_nextmod")
    
gp_mintime get_cvar_pointer("amx_mm_mintime")

    
    
set_cvar_num("sv_restart"1)
    new 
izWinlimit get_cvar_num("mp_winlimit")
    new 
izMaxrounds get_cvar_num("mp_maxrounds")
    new 
Float:elapsedTime get_cvar_float("mp_timelimit") - (float(get_timeleft()) / 60.0)
        new 
Float:steptime get_cvar_float("amx_mm_extendmap_step")
        
set_cvar_float("mp_timelimit"get_cvar_float("mp_timelimit") + steptime)
        
set_cvar_string("amx_nextmap"smap)
    
get_cvar_string("amx_nextmap"smapSTRING_MAX-1)
    
get_cvar_string("amx_nextmod"izTmpSTRING_MAX-1)
    
set_cvar_string("amx_nextmod"g_modNames[g_modIdNext])
    if(
get_cvar_float("amx_vote_answers")) {
    if(
get_cvar_float("amx_vote_answers")) {
    
get_cvar_string("amx_nextmap"smapSTRING_MAX-1
You barely use pcvars. You get pointers for two of your cvars and you only use them a couple times when you should use them for all usages of those cvars.

Get pointers for all cvars regardless of whether or not you define them in your plugin.

Also, the output of register_cvar() is the pointer value. No need to use an extra function to retrieve the value:

PHP Code:
        gp_nextmod register_cvar("amx_nextmod"""
_____________________________________________ ____________________
Also,

PHP Code:
        g_modName g_modNames[g_modId
Assigning an array with an array is best done with copy() and not "array = array"
__________________
fysiks is offline
cryingsoul
Junior Member
Join Date: Aug 2009
Old 08-26-2009 , 09:32   Re: Multimod Plugin
Reply With Quote #73

Code:
 [ 24] MultiMod Manager        0.5         Piegtas           multimod.amxx    running  
24 plugins, 24 running
L 08/26/2009 - 15:31:13: Invalid array handle provided (0)
L 08/26/2009 - 15:31:13: [AMXX] Run time error 10 (plugin "multimod.amxx") (native "ArraySize") - debug not enabled!
L 08/26/2009 - 15:31:13: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
cryingsoul is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 08-26-2009 , 10:14   Re: Multimod Plugin
Reply With Quote #74

Quote:
To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 08-26-2009 , 14:25   Re: Multimod Plugin
Reply With Quote #75

Quote:
Originally Posted by cryingsoul View Post
Code:
 [ 24] MultiMod Manager        0.5         Piegtas           multimod.amxx    running  
24 plugins, 24 running
L 08/26/2009 - 15:31:13: Invalid array handle provided (0)
L 08/26/2009 - 15:31:13: [AMXX] Run time error 10 (plugin "multimod.amxx") (native "ArraySize") - debug not enabled!
L 08/26/2009 - 15:31:13: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
As crazzyeffect said, enable debug and post the logs.

Please, post your plugin list and multmod.ini file too.

Thanks
joropito is offline
Send a message via MSN to joropito
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 08-26-2009 , 21:56   Re: Multimod Plugin
Reply With Quote #76

Quote:
Originally Posted by fysiks View Post
What happened here...
Done.
Done.
Done.

fysiks, can you check if it's all right done of if I miss understood something?

Thanks

Here's the files.

v0.7
* Added 30 seconds of warmup to avoid conflict/crash with other plugins
* Changed all cvars to amx_xxx format (removed _mm_ part)
* Fixed and improved pcvar usage
Attached Files
File Type: sma Get Plugin or Get Source (multimod.sma - 733 views - 13.9 KB)
File Type: txt multimod.txt (1.9 KB, 192 views)
joropito is offline
Send a message via MSN to joropito
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-27-2009 , 00:08   Re: Multimod Plugin
Reply With Quote #77

Looks much better.

I see that you use
Code:
get_pcvar_float(gp_voteanswers)
and I noticed that many stock plugins do also but that cvar is either 1 or 0 so I would use:

Code:
get_pcvar_num(gp_voteanswers)
__________________
fysiks is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 08-27-2009 , 21:36   Re: Multimod Plugin
Reply With Quote #78

Updated to v0.8 (there's no v0.7)
joropito is offline
Send a message via MSN to joropito
cryingsoul
Junior Member
Join Date: Aug 2009
Old 08-29-2009 , 15:21   Re: Multimod Plugin
Reply With Quote #79

so lemme ask you something..

do i need to add the mods first? the mods:

Surf
GunGame
Deathrun

do i need to add them at plugins to make this work ?
cryingsoul is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 08-29-2009 , 15:43   Re: Multimod Plugin
Reply With Quote #80

Quote:
Originally Posted by cryingsoul View Post
so lemme ask you something..

do i need to add the mods first? the mods:

Surf
GunGame
Deathrun

do i need to add them at plugins to make this work ?
Yes, but you may use another file if you wish: plugins-whatever.ini

I didn't tested yet gungame with multimod, but I guess it should work.
joropito is offline
Send a message via MSN to joropito
Reply



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 16:36.


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