Raised This Month: $ Target: $400
 0% 

msg fix


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
omgdpcwtf
Member
Join Date: Apr 2011
Old 11-17-2014 , 06:57   msg fix
Reply With Quote #1

Hi, please I need a little fix, message which I had wrote will not show.

Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta>
#include <fun>
#include <cstrike>
#include <engine>

new gidPlayer[33]

public plugin_init() {
    register_plugin("PM", "1.0", "AMXMODX");
    
    
    register_clcmd("say /mp", "cmdtest")
    register_clcmd("PM",     "player")
}

public cmdtest(id)
{
    new menu = menu_create("For Who?", "choose")
    
    new player2, players[ 32 ], num, name[32]
    get_players( players, num, "a" )
    for ( new i = 0; i < num; i++ )
    {
        player2 = players[i]
        get_user_name(player2, name, charsmax(name))
        menu_additem(menu, name, "", 0)
    }
    menu_display(id, menu, 0)
}

public choose(id, menu, item)
{
    if( item == MENU_EXIT )
    {
        menu_destroy(menu)
        return PLUGIN_HANDLED
    }
    
    new Data[6], Name[64]
    new Access, Callback
    menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback)
    
    new player2 = str_to_num(Data)
 
    gidPlayer[id] = player2
    client_cmd(id, "messagemode PM")
    
    menu_destroy(menu)
    return PLUGIN_HANDLED
}

public player(id)
{
    new say[300]
    read_args(say, charsmax(say))
        
    remove_quotes(say)
        
    if(!is_str_num(say) || equal(say, ""))
        return PLUGIN_HANDLED
        
    msgpm(id, say)    
    
    return PLUGIN_CONTINUE
}

msgpm(id, say[]) {
    new amount = str_to_num(say)
    new victim = gidPlayer[id]
    
    new vname[32], vname2[32]
    get_user_name(victim, vname, 31)
    get_user_name(id, vname2, 31)
        
    client_print(id , print_chat, "[PM] for player %s: %s", vname, amount);
    client_print(victim, print_chat, "[PM] from player %s: %s", vname2, amount)    

    
}
omgdpcwtf 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 17:43.


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