Raised This Month: $ Target: $400
 0% 

get_user_weapon2() give me only one letter


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 10-01-2009 , 06:33   get_user_weapon2() give me only one letter
Reply With Quote #1

Well the problem is with the stock by xPaw:

http://forums.alliedmods.net/showthread.php?t=88242

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

#define PLUGIN    "New Plugin"
#define AUTHOR    "Alucard"
#define VERSION    "1.0"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /test""Test")
}

public 
Test(id)
{
    
client_print(idprint_chat"Your weapon is: %s"get_user_weapon2(id) )
}

public 
get_user_weapon2(id)
{
    new 
szWeapon[20]
    
get_weaponname(get_user_weapon(id), szWeaponcharsmax(szWeapon) )
    
    return 
szWeapon[7]

For example with USP, i get this message:

Quote:
Your weapon is: uVfnz
And with knife i get:

Quote:
Your weapon is: k
o.O
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
 



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 22:35.


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