Raised This Month: $ Target: $400
 0% 

Help...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
USvER
Junior Member
Join Date: Nov 2006
Location: Ukraine, Kyiv
Old 11-10-2006 , 07:35   Help...
Reply With Quote #1

Hello from Ukraine...
Sorry for my English...
I'm beginner and i need help...

I want to create plugin that gives all gamers: "sv_restart 1" and "changelevel ..."
Code:
#include <amxmodx> #include <amxmisc> new PLUGIN[]="Cuted Rights" new AUTHOR[]="USvER" new VERSION[]="0.01b" public plugin_init() {      register_plugin(PLUGIN, VERSION, AUTHOR)      register_concmd("server_restart", "server_restart", ADMIN_SLAY, "")      register_concmd("server_changelevel", "server_changelevel", ADMIN_SLAY, "<map>")      return PLUGIN_CONTINUE } public server_changelevel() {      new Arg1[24]      read_argv(1, Arg1, 23)      server_exec("changelevel %s",Arg1)      return PLUGIN_HANDLED } public server_restart() {      server_exec("sv_restart","1")      return PLUGIN_HANDLED }

And i get error:
Code:
usver.sma(20) : error 088: number of arguments does not match definition
usver.sma(26) : error 088: number of arguments does not match definition
What is a problem in? I can't find the arguments for "server_exec()"...

Last edited by USvER; 11-10-2006 at 07:51.
USvER is offline
Send a message via ICQ to USvER
jim_yang
Veteran Member
Join Date: Aug 2006
Old 11-10-2006 , 09:04   Re: Help...
Reply With Quote #2

yea, server_exec() has no arguments
use server_cmd(" ")
besides server_changelevel() is a forward, you'd better change the concmd name.
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>

Last edited by jim_yang; 11-10-2006 at 09:22.
jim_yang is offline
USvER
Junior Member
Join Date: Nov 2006
Location: Ukraine, Kyiv
Old 11-10-2006 , 10:12   Re: Help...
Reply With Quote #3

Thx... Now its working...
Good idea to make plugin like firewall with rules like:
user_identifier:command1[param1|param2|paramN],command2[param1|param2|paramN],commandN[param1|param2|paramN]
To open usage of some commands to some_user
USvER is offline
Send a message via ICQ to USvER
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 06:54.


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