Raised This Month: $ Target: $400
 0% 

2 lil questions :)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-25-2009 , 06:16   Re: 2 lil questions :)
Reply With Quote #1

First one should work since it's an event, aka message has already been sent.
Try instead : register_event("TextMsg", "event_game_restart", "a", "2&#Game_w")

PHP Code:
#include <amxmodx>
#include <fakemeta>

#define VERSION "0.0.1"

new gmsgTextMsg
new g_iFhWriteString

public plugin_init()
{
    
register_plugin("Game Restart"VERSION"ConnorMcLeod")

    
register_forward(FM_MessageBegin"MessageBegin"1)

    
gmsgTextMsg get_user_msgid("TextMsg")
}

public 
MessageBegin(MSG_DESTiMsgId)
{
    if( 
iMsgId == gmsgTextMsg )
    {
        
g_iFhWriteString register_forward(FM_WriteString"WriteString")
    }
}

public 
WriteString( const szString[] )
{
    static const 
Game_will_restart_in[] = "#Game_will_restart_in"
    
static const Live[] = "L i v e !!"

    
unregister_forward(FM_WriteStringg_iFhWriteString)

    if( 
equal(szStringGame_will_restart_in) )
    {
        
write_string(Live)
        return 
FMRES_SUPERCEDE
    
}
    return 
FMRES_IGNORED

__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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