Raised This Month: $ Target: $400
 0% 

Chat print help.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Cretu
Member
Join Date: Mar 2009
Old 06-07-2009 , 04:39   Chat print help.
Reply With Quote #1

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 )

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 ) . 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;
}

Last edited by Cretu; 06-07-2009 at 04:42.
Cretu is offline
 



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 14:00.


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