Raised This Month: $ Target: $400
 0% 

2 lil questions :)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 10-25-2009 , 03:20   Re: 2 lil questions :)
Reply With Quote #1

1. If you want to catch "the game will restart in x seconds" then use this:

PHP Code:
public plugin_init(){
    
register_event("TextMsg""event_game_restart""a""2=#Game_will_restart_in")
}

public 
event_game_restart(){


You can use it to send some messages to player like "The game is LIVE" or whatever...

2. To block chat message you need to add "return PLUGIN_HANDLED" at the end of function:
PHP Code:
public plugin_init()
{
    
register_plugin("Say /cmds""1.0""AmoneL");
    
register_clcmd("say /cmds""test");
}

public 
test(id)
{
    static 
name[32];
    
get_user_name(idname31);
    
client_print(0print_chat"%s said /cmds"name);
    return 
PLUGIN_HANDLED;

You should also fix your indentation and use of semi-colons (use them everywhere or don't use them at all).
__________________
Impossible is Nothing

Last edited by Sylwester; 10-25-2009 at 03:25.
Sylwester 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 17:44.


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