Raised This Month: $32 Target: $400
 8% 

Request plugin exec


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MrJ4yNguy3n
Junior Member
Join Date: Mar 2013
Old 04-07-2013 , 16:24   Request plugin exec
Reply With Quote #1

Hello guys!!
This is my first post and I am not good at English. I also dont know how to write an amxx file, so I need some help, ...

I want an plugin when I "say /start" and server run "exec match.cfg", like this I "say /tt" and "say /public" server run "exec 1minute.cfg" and "public.cfg"

Thank you for your help!!
MrJ4yNguy3n is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-08-2013 , 02:14   Re: Request plugin exec
Reply With Quote #2

Code:
#include <amxmodx>

public plugin_init()
{
	register_clcmd("say /start", "cmdStart")
	register_clcmd("say /tt", "cmdMinute")
	register_clcmd("say /public", "cmdPublic")
}

public cmdStart()
{
	server_cmd("exec match.cfg")
}

public cmdOther()
{
	server_cmd("exec 1minute.cfg")
}

public cmdPublic()
{
	server_cmd("exec public.cfg")
}
__________________

Last edited by fysiks; 04-08-2013 at 02:15.
fysiks is offline
MrJ4yNguy3n
Junior Member
Join Date: Mar 2013
Old 04-08-2013 , 19:20   Re: Request plugin exec
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
Code:
#include <amxmodx>

public plugin_init()
{
	register_clcmd("say /start", "cmdStart")
	register_clcmd("say /tt", "cmdMinute")
	register_clcmd("say /public", "cmdPublic")
}

public cmdStart()
{
	server_cmd("exec match.cfg")
}

public cmdOther()
{
	server_cmd("exec 1minute.cfg")
}

public cmdPublic()
{
	server_cmd("exec public.cfg")
}
Thanks, but all users can use command, dont know why? .. Please help me!!
MrJ4yNguy3n is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 04-08-2013 , 19:24   Re: Request plugin exec
Reply With Quote #4

Quote:
Originally Posted by MrJ4yNguy3n View Post
Thanks, but all users can use command, dont know why? .. Please help me!!
You never said that you wanted it restricted to a specific admin level.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
enjoi.
Veteran Member
Join Date: Mar 2011
Old 04-08-2013 , 21:50   Re: Request plugin exec
Reply With Quote #5

Code:
#include <amxmodx>

#define USAGE_LEVEL ADMIN_KICK

public plugin_init()
{
	register_clcmd("say /start", USAGE_LEVEL, "cmdStart")
	register_clcmd("say /tt", USAGE_LEVEL, "cmdMinute")
	register_clcmd("say /public", USAGE_LEVEL, "cmdPublic")
}

public cmdStart()
{
	server_cmd("exec match.cfg")
}

public cmdOther()
{
	server_cmd("exec 1minute.cfg")
}

public cmdPublic()
{
	server_cmd("exec public.cfg")
}
__________________
Block Maker v6.0 []
Point Slay v3.0 []
Contact [ PM ]

Last edited by enjoi.; 04-09-2013 at 08:36.
enjoi. is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-08-2013 , 23:56   Re: Request plugin exec
Reply With Quote #6

@enjoi, Your modification did nothing to change how the plugin works. Also, post code in code or php tags.
__________________
fysiks is offline
MrJ4yNguy3n
Junior Member
Join Date: Mar 2013
Old 04-09-2013 , 14:33   Re: Request plugin exec
Reply With Quote #7

I already did it. Thank guys!!!
MrJ4yNguy3n is offline
Reply


Thread Tools
Display Modes

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 10:32.


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