Raised This Month: $ Target: $400
 0% 

join 2 plugins into one


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ashcan
Senior Member
Join Date: May 2008
Old 09-30-2009 , 14:43   join 2 plugins into one
Reply With Quote #1

hello
i have xp mod.

so i have ...

Code:
public plugin_init()
{
    register_plugin("xxxxx", VERSION, "xxxxxxx")
    register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
    register_logevent("event_game_commencing", 2, "1=Game_Commencing")
    register_concmd("amx_start", "start_cmd", ADMIN_KICK)
    register_concmd("amx_stop", "stop_cmd", ADMIN_KICK)
    register_dictionary("xxxxxxx.txt")

    g_cvarDomEnabled = register_cvar("amx_dom_enabled", "1")
    g_cvarMapEndTime = register_cvar("amx_mapendtime", "0.5")
    g_cvarTieMatch = register_cvar("amx_tiematch", "0")
    g_cvarUseRadio = register_cvar("amx_useradio", "1")

    g_msgidProgress = get_user_msgid("BarTime2")
    g_msgidScoreInfo = get_user_msgid("ScoreInfo")
    g_msgidIcon = get_user_msgid("StatusIcon")
    g_msgidSayText = get_user_msgid("SayText")

    g_msgidHostagePos = get_user_msgid( "HostagePos" );
    g_msgidHostageK   = get_user_msgid( "HostageK" );

    g_MaxPlayers = get_maxplayers()

    if(get_pcvar_num(g_cvarDomEnabled)) {
        if(load_config()) {
            xxxxxx_init()
        }
    }
#if defined DEBUG_TOOLS
    register_concmd("xxxxxx", "xxxxxxx")
    register_concmd("xxxxxxx", "xxxxxxxx")

    new mapname[32]
    new msg[128]

    get_mapname(mapname, 31)

    open_debug_file()
    format(msg, 127, "***^nStarting Debug Section^nMap: %s^n***", mapname)
    debug_print(0, msg)
    close_debug_file()
#endif

    set_task( float( RADAR_FQC ) ,"RadarLoop", 547847, _, _, "b" );

    }

public plugin_precache()
{
    precache_model(MODEL_XXXXXX)
    precache_sound(g_NotifySound[0])
    precache_sound(g_NotifySound[1])
}
and it works
but i want join one more plugin (exactly that one --> http://forums.alliedmods.net/showthread.php?t=1291)

so i put...

Code:
new menutext[77]
new keysentered[33][8]
new loop[33]
that on the top (undex the #include<amxmodx>

next...

Code:
	register_plugin("Admin In-game Access","0.16","ts2do")
	format(menutext,77,"\yEnter Code:\w^n  \y1  \w2  \y3^n  \w4  \y5  \w6^n  \y7  \w8  \y9^n \wExit. 0  ")
	register_menucmd(register_menuid(menutext),1023,"loginContinue")
	register_clcmd("say /login","login")
	register_cvar("login_code","12345678")
	register_cvar("login_flags","bcdefghijklmnopqrstu")
	register_cvar("login_stop","You don't wanna continue at this, do you?")//lol
that i insert in public plugin_init()
just on TOP.
i remove "register_plugin line..."
-----------
and just after public plugin_init() when it ends with }
i paste last part

Code:
public loginContinue(id,key){
	loop[id]++
	new strKey[8]
	num_to_str(key+1,strKey,7)
	format(keysentered[id],32,"%s%s",keysentered[id],strKey)
	new code[33]
	get_cvar_string("login_code",code,32)
	if(equal(keysentered[id],code)){
		new userflags[128]
		get_cvar_string("login_flags",userflags,127)
		set_user_flags(id,read_flags(userflags))
		new username[32]
		get_user_name(id,username,31)
		client_print(id,print_chat,"Welcome, %s, you are now logged in",username)
		return PLUGIN_HANDLED
	}
	if((key==9)){
		loop[id]=0
		keysentered[id]=""
		return PLUGIN_HANDLED
	}
	if(loop[id]>=15){
		new ender[128]
		get_cvar_string("login_stop",ender,127)
		if(strlen(ender))
			client_print(id,print_chat,"%s",ender)
	}
	showmenu(id)
	return PLUGIN_CONTINUE
}

public showmenu(id)
	show_menu(id,1023,menutext)

public login(id){
	showmenu(id)
	return PLUGIN_HANDLED
}
but on compiling there is 2 errors...
Warning: Loose indentation on line 474
Warning: Loose indentation on line 475

474:format(loginmenu,77,"\yEnter Code:\w^n \y1 \w2 \y3^n \w4 \y5 \w6^n \y7 \w8 \y9^n \wExit. 0 ")

and

475:register_menucmd(register_menuid(loginmen u),1023,"loginContinue")

can you guys tell me what that error means ? and why it DOESNT work ?
Ashcan is offline
Javivi
AlliedModders Donor
Join Date: Dec 2008
Old 09-30-2009 , 14:47   Re: join 2 plugins into one
Reply With Quote #2

You don't tabbed ok.

Try making a backup of the .sma and pressing Ctrl + I to identate the code.
__________________
Javivi is offline
Ashcan
Senior Member
Join Date: May 2008
Old 09-30-2009 , 14:59   Re: join 2 plugins into one
Reply With Quote #3

when i press CTRL + I and identating is finished
then i compile once again and more errors are there
Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Warning: Loose indentation on line 635
Warning: Loose indentation on line 638
Warning: Loose indentation on line 667
Warning: Loose indentation on line 737
Warning: Loose indentation on line 779
Warning: Loose indentation on line 953
Warning: Loose indentation on line 965
Warning: Loose indentation on line 969
Warning: Loose indentation on line 1521
Warning: Loose indentation on line 1709
Warning: Loose indentation on line 1814
Warning: Loose indentation on line 1825
Warning: Loose indentation on line 1834
Warning: Loose indentation on line 1967
Warning: Loose indentation on line 1970
Warning: Loose indentation on line 2008
Warning: Loose indentation on line 2077
Warning: Loose indentation on line 2097
Warning: Loose indentation on line 2110
Warning: Loose indentation on line 2263
Header size:           2456 bytes
Code size:            43608 bytes
Data size:            16604 bytes
Stack/heap size:      16384 bytes; max. usage is unknown, due to recursion
Total requirements:   79052 bytes

20 Warnings.
Done.
Ashcan is offline
Ashcan
Senior Member
Join Date: May 2008
Old 09-30-2009 , 15:02   Re: join 2 plugins into one
Reply With Quote #4

can u join together 2 plugins into one ?

and post me sma file :]

sorry for double post, :/
Attached Files
File Type: sma Get Plugin or Get Source (flags.sma - 93 views - 76.0 KB)
File Type: sma Get Plugin or Get Source (ingameadmin.sma - 545 views - 1.4 KB)
Ashcan is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-30-2009 , 15:43   Re: join 2 plugins into one
Reply With Quote #5

Combining these two plugins would not make a noticeable difference.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Ashcan
Senior Member
Join Date: May 2008
Old 09-30-2009 , 16:00   Re: join 2 plugins into one
Reply With Quote #6

i just need these 2 plugins into one so it would be xp mod with login panel.

can it be done?
Ashcan is offline
Old 09-30-2009, 16:57
Ashcan
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post.
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 22:37.


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