Raised This Month: $ Target: $400
 0% 

Little Trouble CAL-CZ Config


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Anarchist
Junior Member
Join Date: Nov 2005
Old 12-13-2005 , 02:10   Little Trouble CAL-CZ Config
Reply With Quote #1

Hi, well. I think im over my head in this plugin, but its an idea..

Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

public plugin_init() {
	register_plugin("StnCALMod","1.0","Anarch!st")
	register_clcmd("say /pregame",cmd_pg, ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command")
	register_clcmd("say /prelo3",cmd_prelive, ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command")
	register_clcmd("say /lo3",cmd_live, ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command")
	register_clcmd("say /halftime",cmd_half, ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command")
	register_clcmd("say /stop","cmd_endall", ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command")
}
public cmd_pg() {
	client_print(0,print_chat,const message[],^-[A]narch!st CAL- Config Plugin-^)
	server_exec("exec pregame.cfg")
	PLUGIN_CONTINUE
}
public cmd_prelive() {
	client_print(0,print_chat,const message[], CAL-Open Config has been Started)
	client_print(0,print_chat,const message[], Type ready in chat to start the match!)
	client_print(0,print_chat,const message[], Match will not start until both teams confirm they are ready)
	PLUGIN_CONTINUE
}
public cmd_half() {
	client_print(0,print_chat,const message[], Good Half Everyone)
	server_exec("sv_restartround 1")
	PLUGIN_CONTINUE
}
public cmd_endall() {
	client_print(0,print_chat,const message[], This Match Has Been Stopped, Thanks for Playing)
	server_exec("sv_restartround 1")
	server_exec("exec server.cfg")
	PLUGIN_CONTINUE
}
public cmd_live() {
	server_exec("exec lo3.cfg")
	client_print(0,print_chat,const message[], Good Luck, Have Fun, and Please Talk in Teamsay, The match is starting!)
	PLUGIN_CONTINUE
}
I get errors every line, I think Ive underestimated the difficulty[/quote]
__________________
My Plugins:
(Im learning the basics of code)
(Please IM me on AOL in my profile if you can help)
Anarchist is offline
Send a message via AIM to Anarchist
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 12-13-2005 , 02:30  
Reply With Quote #2

Code:
#include <amxmodx> public plugin_init() {    register_plugin("StnCALMod","1.0","Anarch!st")    register_clcmd("say /pregame", "cmd_pg", ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command")    register_clcmd("say /prelo3", "cmd_prelive", ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command")    register_clcmd("say /lo3", "cmd_live", ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command")    register_clcmd("say /halftime", "cmd_half", ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command")    register_clcmd("say /stop","cmd_endall", ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command") } public cmd_pg() {    client_print(0,print_chat,"-[A]narch!st CAL- Config Plugin-")    server_cmd("exec pregame.cfg")    return PLUGIN_CONTINUE } public cmd_prelive() {    client_print(0,print_chat,"CAL-Open Config has been Started")    client_print(0,print_chat, "Type ready in chat to start the match!")    client_print(0,print_chat,"Match will not start until both teams confirm they are ready")    return PLUGIN_CONTINUE } public cmd_half() {    client_print(0, print_chat, "Good Half Everyone")    server_cmd("sv_restartround 1")    return PLUGIN_CONTINUE } public cmd_endall() {    client_print(0,print_chat, "This Match Has Been Stopped, Thanks for Playing")    server_cmd("sv_restartround 1")    server_cmd("exec server.cfg")    return PLUGIN_CONTINUE } public cmd_live() {    server_cmd("exec lo3.cfg")    client_print(0,print_chat," Good Luck, Have Fun, and Please Talk in Teamsay, The match is starting!")    return PLUGIN_CONTINUE }


Not sure if Admin flags work in say... I don't know.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
Anarchist
Junior Member
Join Date: Nov 2005
Old 12-13-2005 , 22:00  
Reply With Quote #3

Thanks, I added some new parts to it aswell, but now im having a problem checking if the user has admin...

In the documentations:

is_user_admin (id)
but what does it return it as? Or how can i do this..
__________________
My Plugins:
(Im learning the basics of code)
(Please IM me on AOL in my profile if you can help)
Anarchist is offline
Send a message via AIM to Anarchist
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 12-13-2005 , 22:06  
Reply With Quote #4

Code:
if(is_user_admin(id)) { }

But this will return true if the person even just has reserve flag.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
Jordan
Veteran Member
Join Date: Aug 2005
Old 12-13-2005 , 22:20  
Reply With Quote #5

You could also make them all concmds:

Code:
public plugin_init() {    register_plugin("StnCALMod","1.0","Anarch!st")    register_concmd("amx_pregame", "cmd_pg", ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command")    register_concmd("amx_prelo3", "cmd_prelive", ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command")    register_concmd("amx_lo3", "cmd_live", ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command")    register_concmd("amx_halftime", "cmd_half", ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command")    register_concmd("amx_stop","cmd_endall", ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command") } public cmd_pg() {    client_print(0,print_chat,"-[A]narch!st CAL- Config Plugin-")    server_cmd("exec pregame.cfg")    return PLUGIN_CONTINUE } public cmd_prelive() {    client_print(0,print_chat,"CAL-Open Config has been Started")    client_print(0,print_chat, "Type ready in chat to start the match!")    client_print(0,print_chat,"Match will not start until both teams confirm they are ready")    return PLUGIN_CONTINUE } public cmd_half() {    client_print(0, print_chat, "Good Half Everyone")    server_cmd("sv_restartround 1")    return PLUGIN_CONTINUE } public cmd_endall() {    client_print(0,print_chat, "This Match Has Been Stopped, Thanks for Playing")    server_cmd("sv_restartround 1")    server_cmd("exec server.cfg")    return PLUGIN_CONTINUE } public cmd_live() {    server_cmd("exec lo3.cfg")    client_print(0,print_chat," Good Luck, Have Fun, and Please Talk in Teamsay, The match is starting!")    return PLUGIN_CONTINUE }
Jordan is offline
Anarchist
Junior Member
Join Date: Nov 2005
Old 12-13-2005 , 22:32  
Reply With Quote #6

And lose the easy setup? Nah, Thanks though.
__________________
My Plugins:
(Im learning the basics of code)
(Please IM me on AOL in my profile if you can help)
Anarchist is offline
Send a message via AIM to Anarchist
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 12-13-2005 , 22:36  
Reply With Quote #7

change the function names to public cmd_*(id , level , cid) and then add the following to the top of all the functions
Code:
if(!cmd_access(id , level , cid , 0)) return PLUGIN_CONTINUE
And then its only availible for admins.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
aLpiNe^cLuBz
Member
Join Date: Dec 2005
Old 12-13-2005 , 23:24  
Reply With Quote #8

I'm not trying to flame or anything, but usually scrim servers dont have amxx therfore they can't use this plugin.
__________________
AlpineRP - Working on...
HaloMod - Working on...
aLpiNe^cLuBz is offline
Send a message via AIM to aLpiNe^cLuBz
Anarchist
Junior Member
Join Date: Nov 2005
Old 12-13-2005 , 23:36  
Reply With Quote #9

For my own self pleasure, I would like to make it. Its a start of what I HOPE is a long scripting/coding hobby.
__________________
My Plugins:
(Im learning the basics of code)
(Please IM me on AOL in my profile if you can help)
Anarchist is offline
Send a message via AIM to Anarchist
aLpiNe^cLuBz
Member
Join Date: Dec 2005
Old 12-13-2005 , 23:44  
Reply With Quote #10

Ah, ok. Good luck.
__________________
AlpineRP - Working on...
HaloMod - Working on...
aLpiNe^cLuBz is offline
Send a message via AIM to aLpiNe^cLuBz
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 15:56.


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