Hello.
This a simple cod that allows you to use amx_freezetime in stead of amx_cvar mp_freezetime.
The THING is that it doen`t print the command in the server`s general chat.
I want it to say on the chat "Command : <admin who uses the command> Changed cvar <freezetime,limitteams or any cvar i wait to put in the plugin> to 1"
COULD someone please add the line for this with red color ( so i know what is added) and someone please explain every single letter`s function ?
Example : new name[32],com[32] // we will use name as a variable for the admins name and com variable for the commad
QUESTION 2 : How i add a wait period in a plugin ? Because I done this :
client_cmd (print_chat;wait;wait;snapshot;wait;wait;)
server_cmd (around 40 waits here)
server_cmd (ban client) .
Is there a special line for those waits ? lie in stead of using 40 waits like that just type : server_wait_20_seconds
![Smile](images/smilies/smile.gif)
)
I hope someone help me with this . I must say i`m a total n00b at coding , i just copy a part of a cod , ad another part from another plugin and from 2 part i make 1 plugin and register the plugin under everybody`s names
![Smile](images/smilies/smile.gif)
) . So it won`t be stealing.
Thank you for you`r time .
Code:
#include <amxmodx>
#include <amxmisc>
new mp_freezetime;
public plugin_init()
{
register_plugin("amx_freezetime", "0.1", "Exolent");
register_concmd("amx_freezetime", "CmdFreezetime", ADMIN_KICK, "<freezetime seconds>");
mp_freezetime = get_cvar_pointer("mp_freezetime");
}
public CmdFreezetime(plr, level, cid)
{
if( !cmd_access(plr, level, cid, 2) )
{
return PLUGIN_HANDLED;
}
new arg[10];
read_argv(1, arg, sizeof(arg) - 1);
new num = str_to_num(arg);
set_pcvar_num(mp_freezetime, num);
console_print(plr, "[AMXX] You set mp_freezetime to %i", num);
return PLUGIN_HANDLED;
}