This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

!rr !mr15 !prac


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Senchok
Member
Join Date: Sep 2008
Old 06-10-2010 , 10:22   !rr !mr15 !prac
Reply With Quote #1

I have the files of the MR and PRAC CFG CFG I want those who have Admin on AMX on Flagg KICK he can register on the server! Rr Oh! Mr15 Oh! Prac It will make the commands

thanx!
Senchok is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 06-10-2010 , 12:44   Re: !rr !mr15 !prac
Reply With Quote #2

Something like this?

Code:
#include <amxmisc> #define PLUGIN  "Admin Exec CFG" #define AUTHOR  "Alucard" #define VERSION "0.0.1" #define IsUserAdmin(%1)     (get_user_flags(%1) & ADMIN_KICK) new const mrCFG[] = "mr15.cfg"; new const prCFG[] = "practice.cfg"; public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR);     register_clcmd("say", "HookCmdSay"); } public HookCmdSay(id) {     new szSay[192];     read_args(szSay, 191);     remove_quotes(szSay);         if(!strlen(szSay) || szSay[0] == ' ' || szSay[0] != '!')         return PLUGIN_CONTINUE;         if(!IsUserAdmin(id) )         return PLUGIN_HANDLED_MAIN;         if(equali(szSay[1], "rr", 2) )     {         server_cmd("sv_restart 1");     }     else if(equali(szSay[1], "mr15", 4) )     {         server_cmd("exec %s", mrCFG);         server_exec(); // dunno if is needed...     }     else if(equali(szSay[1], "prac", 4) )     {         server_cmd("exec %s", prCFG);         server_exec(); // dunno if is needed...     }     else return PLUGIN_CONTINUE;         return PLUGIN_HANDLED_MAIN; }
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Senchok
Member
Join Date: Sep 2008
Old 06-11-2010 , 05:06   Re: !rr !mr15 !prac
Reply With Quote #3

what i need say in
dunno if is needed...
?
Senchok is offline
Senchok
Member
Join Date: Sep 2008
Old 06-11-2010 , 05:23   Re: !rr !mr15 !prac
Reply With Quote #4

i do compile and..

/home/groups/amxmodx/tmp3/phpp8ynVW.sma(14) : error 037: invalid string (possibly non-terminated string)
Senchok is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 06-11-2010 , 06:31   Re: !rr !mr15 !prac
Reply With Quote #5

You changed something or you are using a old compiler?

Compile fine for me.

Quote:
Originally Posted by Senchok View Post
what i need say in
dunno if is needed...
?
Nothing, i don't know if is needed the server_exec() (sometimes is needed, but i don't remember in what case, so...)
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...

Last edited by Alucard^; 06-11-2010 at 06:34.
Alucard^ is offline
Send a message via Skype™ to Alucard^
unnyquee
Senior Member
Join Date: Jun 2009
Location: Constanta, Romania
Old 06-11-2010 , 07:47   Re: !rr !mr15 !prac
Reply With Quote #6

Quote:
Originally Posted by AMX Mod X Function Reference Search
server_exec


server_exec - Forces server to execute sent server command at current time. Very useful for map changes, setting cvars and other activities.
Syntax:

server_exec ( ) Type:

Native
__________________
unnyquee is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 06-11-2010 , 09:47   Re: !rr !mr15 !prac
Reply With Quote #7

Mmmm, yes i saw the description, but i dont understand when we have to use it and when not, maybe cuz my english is not perfect, but... i think i understand the description (but maybe the description is not rly good, cuz doesn't explain exactly in what case we need to use). For example, i used server_cmd("changelevel mapname") without the server_exec() and work perfect, so?
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
unnyquee
Senior Member
Join Date: Jun 2009
Location: Constanta, Romania
Old 06-11-2010 , 10:31   Re: !rr !mr15 !prac
Reply With Quote #8

I think server_exec( ) will execute last server_cmd( ) somehow immediately.
__________________
unnyquee is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 06-11-2010 , 13:25   Re: !rr !mr15 !prac
Reply With Quote #9

Emm but when i use server_cmd("changelevel mapname") is executed immediately, and without server_exec() xd
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Senchok
Member
Join Date: Sep 2008
Old 06-11-2010 , 18:56   Re: !rr !mr15 !prac
Reply With Quote #10

you can give me the code?

i copy to txt.sma and campile for amxx

thanx!
Senchok is offline
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:13.


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