Raised This Month: $ Target: $400
 0% 

[HELP] get_user_weapons


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GoldNux
Senior Member
Join Date: Mar 2018
Old 04-21-2018 , 12:39   [HELP] get_user_weapons
Reply With Quote #1

I'm trying to print primary, secondary, grenades and kit to chat.
And I'm testing get_user_weapons using this code, but its not working.

Can someone tell me why?

Code:
const WEAPONS_TO_LOOK_FOR = ( 1 << CSW_USP ) | ( 1 << CSW_M4A1 ); public plugin_init() {     register_clcmd("say test", "testFunction") }    public testFunction(id) {     static iWeapons[32], iNum, i;     iNum = 0;     get_user_weapons(id, iWeapons, iNum);     for(i = 0; i < iNum; i++)     if((1 << iWeapons[i]) & WEAPONS_TO_LOOK_FOR)     {         client_cmd(id, "%d %d", iWeapons[0], iWeapons[1])     } }
__________________
Try my version of de_dust2, I think it's great and you should check it out!
https://gamebanana.com/mods/83731

Last edited by GoldNux; 04-21-2018 at 12:40.
GoldNux 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 20:54.


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