Raised This Month: $51 Target: $400
 12% 

Private Message


Post New Thread Reply   
 
Thread Tools Display Modes
hichamera
Senior Member
Join Date: Feb 2014
Location: Algeria
Old 04-17-2014 , 14:51   Re: Private Message
Reply With Quote #11

Quote:
Originally Posted by Ayoub.nasr View Post
all that on that plugin
OMG !! Verry GOood Witch CMD ?
hichamera is offline
Send a message via Skype™ to hichamera
Ayoub.nasr
Member
Join Date: Mar 2014
Location: IN MY MIND
Old 04-17-2014 , 14:54   Re: Private Message
Reply With Quote #12

Quote:
Originally Posted by hichamera View Post
OMG !! Verry GOood Witch CMD ?
yea sure !!
Ayoub.nasr is offline
DavidJr
Senior Member
Join Date: Apr 2012
Old 04-17-2014 , 21:04   Re: Private Message
Reply With Quote #13

Still better this one: https://forums.alliedmods.net/showth...rivate+Message
__________________
What are you looking for here?
DavidJr is offline
driger38
Senior Member
Join Date: Apr 2011
Old 04-23-2014 , 12:27   Re: Private Message
Reply With Quote #14

Quote:
Originally Posted by Ayoub.nasr View Post

With this plugin you can't send a private message
So basically a plugin that CANT send private messages. Seems useful
driger38 is offline
Spawner30
BANNED
Join Date: Dec 2013
Location: I Don't Know Yet
Old 04-24-2014 , 07:34   Re: Private Message
Reply With Quote #15

Try This
PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN    "PM"
#define AUTHOR    "Spawner"
#define VERSION    "1.0"

new const pm_sound[] = {
    
"User"
}

new 
gidPlayer[33]; 
new 
Enable,Prefix

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say","handle")
    
register_clcmd("PrivateMessage""cmd_player");
    
Enable register_cvar("amx_pms","1")  // Activate Cvar
    
Prefix register_cvar("amx_pmprefix","[PM]"// Prefix In Chat ^^'
}

public 
plugin_precache()
{
   
precache_sound(pm_sound)
}  

public 
handle(id)
{
        new 
said[192]
        
read_args(said,192)
        if(( 
contain(said"/pm") != -&& get_pcvar_num(Enable)))
        
cmd_privatemessage(id)
        return 
PLUGIN_HANDLED;
}  
public 
cmd_privatemessage(id)
{
   static 
opcion[64]
   
   
formatex(opcioncharsmax(opcion),"[PM] Private Message \y{Choose A Player} :")
   new 
iMenu menu_create(opcion"pm_handler")
   
   new 
players[32], pnumtempid
   
new szName[32], szTempid[10]
   
   
get_players(playerspnum"ch")
   
   for( new 
ii<pnumi++ )
   {
      
tempid players[i]
      
      
get_user_name(tempidszName31)
      
num_to_str(tempidszTempid9)
      
      
formatex(opcioncharsmax(opcion), "\w%s"szName)
      
menu_additem(iMenuopcionszTempid0)
   }
   
   
menu_display(idiMenu)
   return 
PLUGIN_HANDLED
}

public 
pm_handler(idmenuitem)
{
   if( 
item == MENU_EXIT )
   {
      
menu_destroy(menu)
      return 
PLUGIN_HANDLED
   
}
   
   new 
Data[6], Name[64]
   new 
AccessCallback
   menu_item_getinfo
(menuitemAccessData,5Name63Callback)
   
   new 
tempid str_to_num(Data)
   
   
gidPlayer[id] = tempid
   client_cmd
(id"messagemode PrivateMessage")
   
   
menu_destroy(menu)
   return 
PLUGIN_HANDLED
}

public 
cmd_player(id)
{
   new 
say[300]
   
read_args(saycharsmax(say))
   
   
remove_quotes(say)
   
   if(
equal(say"") || contain(say".") != -)
      return 
PLUGIN_HANDLED
       
   
cmd_send_pm(idsay)   
   return 
PLUGIN_CONTINUE;
}

public 
cmd_send_pm(idsay[])
{
   new 
player gidPlayer[id];
   
   
printMessage(playeridsay)
   return 
PLUGIN_HANDLED;
}
stock printMessage(recieversender, const message[])
{
   new 
Prefixs[15]
   
get_pcvar_string(PrefixPrefixscharsmax(Prefixs))
   new 
name[32];
   
get_user_name(sendernamecharsmax(name))
   new 
szname[32];
   
get_user_name(reciever,szname,31)
   
ColorChat(sender"!gYou Send To %s : !t%s"sznamemessage)
   
ColorChat(reciever"!g%s !t%s !y: !g%s"Prefixsnamemessage)
   
client_cmd(reciever"spk ^"%s^""pm_sound)
}

stock ColorChat(const id, const input[], any:...) 
{
   new 
count 1players32 ]
   static 
msg191 ]
   
vformatmsg190input)
   
   
replace_allmsg190"!g""^4" )
   
replace_allmsg190"!y""^1" )
   
replace_allmsg190"!t""^3" )

   if(
idplayers] = id; else get_playersplayerscount"ch" )
   {
      for(new 
0counti++)
      {
         if( 
is_user_connectedplayers] ) )
         {
            
message_beginMSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players] )  
            
write_byteplayers] )
            
write_stringmsg )
            
message_end( )
         }
      }
   }

Spawner30 is offline
Send a message via Skype™ to Spawner30
swapped
BANNED
Join Date: Mar 2014
Location: OrpheuRegisterHook
Old 04-24-2014 , 08:14   Re: Private Message
Reply With Quote #16

Quote:
With this plugin you can't send a private message
=>
Quote:
With this plugin you can send a private message
swapped is offline
Ayoub.nasr
Member
Join Date: Mar 2014
Location: IN MY MIND
Old 04-27-2014 , 10:50   Re: Private Message
Reply With Quote #17

Quote:
Originally Posted by driger38 View Post
So basically a plugin that CANT send private messages. Seems useful
it's my sick english ;)
Ayoub.nasr is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-18-2015 , 14:03   Re: Private Message
Reply With Quote #18

That one is far more complete: https://forums.alliedmods.net/showth...Message(though I did not check his code yet). Also it seems you just took Spawner30 version, are you able to support this plugin ? Do you at least understand the code ?

Unapproved.
__________________
HamletEagle 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 19:03.


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