Raised This Month: $ Target: $400
 0% 

quotes?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sonic7145
Member
Join Date: Jul 2005
Location: USA
Old 12-30-2005 , 19:50   quotes?
Reply With Quote #1

pruned

Last edited by Sonic7145; 08-09-2021 at 04:10.
Sonic7145 is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 12-31-2005 , 01:33  
Reply With Quote #2

Code:
#include <amxmodx> #include <amxmisc> #define PLUGIN "AMX PM" #define VERSION "1.0" #define AUTHOR "Sonic" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd("amx_pm", "send_message", 0, "<player> <message> - user sends a message to another user.") } // You forgot level, cid public send_message(id, level, cid) {     // change the # of args to 3 because you have the command+<player>+<message>           if (!cmd_access(id, level, cid, 3))         return PLUGIN_HANDLED         new user[32], uid     read_argv(1, user, 31) // change length to 31 (32 - 1 = 31)     new message[256]     read_argv(2, message, 255) // change length to 255 (256 - 1 = 255)     new sendername[32]     get_user_name(id, sendername, 31)         uid = find_player("bh", user)     new name[32]     get_user_name(uid, name, 31)         if (uid == 0) {         console_print(id, "[AMXX] Unable to find player with that name.")         return PLUGIN_HANDLED     }     console_print(id,  "[AMXX] Message sent to %s!", name)     console_print(uid, "** [AMXX] You've recieved a message from %s! **", sendername)     client_print(uid, print_chat, "** Message from %s: %s **", sendername, message)     return PLUGIN_HANDLED }
Additionally, you might want to check if one of the players is dead and trying to talk to someone that's alive.
Code:
if((!is_user_alive(id) && is_user_alive(uid)) || (!is_user_alive(uid) && is_user_alive(id))) {     console_print(id, "[AMXX] You cannot talk to the %s", (is_user_alive(id)) ? "dead" : "living");     return PLUGIN_HANDLED; }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Old 12-31-2005, 01:36
Sonic7145
This message has been deleted by Sonic7145.
VEN
Veteran Member
Join Date: Jan 2005
Old 12-31-2005 , 03:27  
Reply With Quote #3

It was done before.
VEN is offline
Old 12-31-2005, 03:30
Sonic7145
This message has been deleted by Sonic7145.
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 16:13.


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