Raised This Month: $ Target: $400
 0% 

warning plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
r00ted
New Member
Join Date: Dec 2014
Old 12-14-2014 , 08:31   warning plugin
Reply With Quote #1

As i said, from unknow reason the plugin is not displaying reason why i warned someone, here is the code and sample what say

Code:
Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init()
{
	register_plugin("Warning","1.2","r00ted")
	register_concmd("amx_givewarn","cmd_givewarn", ADMIN_RCON, "<userid><reason> - Give warn to player/admins")
}

public cmd_givewarn(id, level, cid)
{
	if(!cmd_access(id, level, cid,2)) {
		return PLUGIN_HANDLED
	}
	else {
		new igrac[32]
		read_argv(1, igrac, 31)
		new player = cmd_target(id, igrac, CMDTARGET_ALLOW_SELF || CMDTARGET_NO_BOTS)
		
		if (!player) {
			return PLUGIN_HANDLED
		}
		
		
		new admin[32]
		read_argv(2, admin, 31)
		get_user_name(id, admin, 30)
		new reason[32];
		read_argv(3, reason, 31)
		client_print(id,print_console,"You give warn to %s",player)
		client_print(player,print_chat,"Admin %s give warn to you. reason: %s",admin, reason)
		client_print(0,print_chat,"Admin%s give warn to %s. reason: %s",admin, player, reason)
		return PLUGIN_HANDLED
	}
	return PLUGIN_HANDLED
}
Example what says:
Code:
Admin r00ted give warn to you.reason:
I been write amx_givewarn r00ted "rules" as reason, but not working... I'm thinking why?

Last edited by r00ted; 12-14-2014 at 08:50.
r00ted is offline
 


Thread Tools
Display Modes

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 15:26.


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