Raised This Month: $ Target: $400
 0% 

user weapon name.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-06-2009 , 05:44   user weapon name.
Reply With Quote #1

Does anyone know how to i get user weapon name ??

get_user_weaponname( id ) doesn't work.
Mr.Noobie is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-06-2009 , 10:27   Re: user weapon name.
Reply With Quote #2

PHP Code:
new iWeapon get_user_weaponid );
new 
szWeapon20 ];
    
if ( 
iWeapon )
    
get_weaponnameiWeapon szWeapon 19 ); 
__________________

Last edited by Bugsy; 08-06-2009 at 10:37.
Bugsy is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-06-2009 , 10:41   Re: user weapon name.
Reply With Quote #3

Next time, try to search by yourself a bit : http://www.amxmodx.org/funcwiki.php ; not that hard to type "weapon" to see the native related to that.
__________________
Arkshine is offline
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-06-2009 , 11:56   Re: user weapon name.
Reply With Quote #4

Quote:
Originally Posted by Arkshine View Post
Next time, try to search by yourself a bit : http://www.amxmodx.org/funcwiki.php ; not that hard to type "weapon" to see the native related to that.
I did, but i don't understand that why i post here
Mr.Noobie is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 08-07-2009 , 06:28   Re: user weapon name.
Reply With Quote #5

http://forums.alliedmods.net/showthr...t_user_weapon2 heh, xpaw
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-07-2009 , 08:03   Re: user weapon name.
Reply With Quote #6

Quote:
Originally Posted by tuty View Post
I try the step from xpaw still can't work the Weapon: %s is Weapon: k

PHP Code:
public get_user_weapon2id ) { 
    new 
szWeapon20 ]; 
    
get_weaponnameget_user_weaponid ), szWeaponcharsmaxszWeapon ) ); 
 
    return 
szWeapon[7]; 

PHP Code:
show_hudmessage(id," Weapon: %s" get_user_weapon2(id)) 
Mr.Noobie is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-07-2009 , 09:58   Re: user weapon name.
Reply With Quote #7

Quote:
Originally Posted by Mr.Noobie View Post
I try the step from xpaw still can't work the Weapon: %s is Weapon: k

PHP Code:
public get_user_weapon2id ) { 
    new 
szWeapon20 ]; 
    
get_weaponnameget_user_weaponid ), szWeaponcharsmaxszWeapon ) ); 
 
    return 
szWeapon[7]; 

PHP Code:
show_hudmessage(id," Weapon: %s" get_user_weapon2(id)) 
PHP Code:
show_hudmessageid " Weapon: %s" get_user_weapon2id ) ) 
__________________
Bugsy is offline
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-08-2009 , 00:24   Re: user weapon name.
Reply With Quote #8

Quote:
Originally Posted by Bugsy View Post
PHP Code:
show_hudmessageid " Weapon: %s" get_user_weapon2id ) ) 
Still didn't work.
Mr.Noobie is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-08-2009 , 00:37   Re: user weapon name.
Reply With Quote #9

Did you first call set_hudmessage()?
__________________
Bugsy is offline
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-08-2009 , 00:47   Re: user weapon name.
Reply With Quote #10

Quote:
Originally Posted by Bugsy View Post
Did you first call set_hudmessage()?
I don't get it.

btw here is the whole codes.

PHP Code:

/**************************************************
* AMXX Script  *      *
* Author: Yuri *      *
*  Version 0.1  * * * * * * * * * * * * * *
* Look at a player and see their name. lolz   *
***************************************************/
#include <amxmodx>
#include <amxmisc>

new friend[33]
public 
set_team(id)
friend[id] = read_data(2)

public 
hide_status(id){
set_hudmessage(0,0,0,0.0,0.0,00.00.010.00.04)
show_hudmessage(id,"")
}

public 
get_user_weapon2id ) { 
    new 
szWeapon20 ]; 
    
get_weaponnameget_user_weaponid ), szWeaponcharsmaxszWeapon ) ); 
     
    return 
szWeapon[7]; 

 
public 
show_status(id){
new 
name[32],pid read_data(2)
get_user_name(pid,name,31)
if (
friend[id] == 1){ /* friend */
set_hudmessage(0,0,225,-1.0,0.60,10.013.00.010.014/* blue */
show_hudmessage(id,"Friend: %s - Health: %d | Armor: %d | Weapon: %s",name,
get_user_health(pid),get_user_armor(pid),get_user_weapon2(pid))
}

else {
set_hudmessage(255,0,0,-1.0,0.60,10.013.00.010.014/* red */
show_hudmessage(id,"Enemy: %s",name)
}
}

public 
plugin_init(){
register_plugin("Player Name","0.1","Yuri")
register_event("StatusValue","set_team","be","1=1")
register_event("StatusValue","show_status","be","1=2","2!0")
register_event("StatusValue","hide_status","be","1=1","2=0")

Mr.Noobie is offline
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 18:22.


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