Raised This Month: $ Target: $400
 0% 

[HELP] Invalid Cvar Pointer


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 05-07-2012 , 12:31   Re: [HELP] Invalid Cvar Pointer
Reply With Quote #8

Try this, cvars: amx_tag "Player" and amx_tag_name "Tag Name"

Untested:

Code:
#include <amxmodx> #include <amxmisc> new Tag; public plugin_init() {     Tag = register_cvar("amx_tag_name", "Amx #");     register_clcmd("amx_tag", "CmdTag"); } public CmdTag(id) {     if(get_user_flags(id) & ADMIN_KICK) {         new User[32], Uid;                 read_argv(1, User, 31);                 Uid = find_player("bhl", User);                 if(Uid == 0) {             client_print(id, print_chat, "Player not found.");             return PLUGIN_HANDLED;         }                 new szName[32], UserTag[32], SetName[32];                 get_user_name(Uid, szName, 31);         get_pcvar_string(Tag, UserTag, 31);                 format(SetName, 31, "%s %s", szName, UserTag);                 set_user_info(Uid, "name", SetName);         return PLUGIN_HANDLED;     }     else {         client_print(id, print_chat, "You can't use this command.");         return PLUGIN_HANDLED;     }     return PLUGIN_CONTINUE; }
__________________

Last edited by kramesa; 05-07-2012 at 12:33.
kramesa 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 00:19.


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