Raised This Month: $ Target: $400
 0% 

My second script. Need some help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-04-2005 , 16:01  
Reply With Quote #3

I believe he is trying to run the commands via player name, so you need to get the name, too. Try this.

Code:
#include <amxmodx> #include <amxmisc> public plugin_init() { register_plugin("amx_mess", "1.0", "XunTric") register_concmd("amx_mess", "cmdmess", ADMIN_KICK, "<name or #userid>") register_concmd("amx_unmess", "cmdunmess", ADMIN_KICK, "<name or #userid>") } public cmdmess(id,level,cid) {     if (!cmd_access(id,level,cid,2))          return PLUGIN_HANDLED     new arg[32]     read_argv(1,arg,31)     new player = cmd_target(id,arg,1)     if(!player)          return PLUGIN_HANDLED     new name[64];     get_user_name(player,name,63);     server_cmd("amx_chicken ^"%s^"", name)     server_cmd("amx_llama ^"%s^"", name)     server_cmd("amx_name ^"%s^" ^"DONT MESS WITH THE ADMINS^"", name)          return PLUGIN_HANDLED }

I also made sure to check that the player was found (the "!player" check) and fixed the flags for cmd_target.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 19:21.


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