Raised This Month: $51 Target: $400
 12% 

getting grenade count in csgo


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 12-27-2014 , 19:09   getting grenade count in csgo
Reply With Quote #1

i'm trying to get the number of grenades for player in csgo
but getting weird as hell results

PHP Code:
#include <sourcemod>
#include <sdktools>

#pragma semicolon 1

public OnPluginStart()
{
    
RegConsoleCmd("sm_test"test"show # of grenades");
}

public 
Action:test(clientarg)
{
    new 
String:sWeaponName[64];
    
GetClientWeapon(clientsWeaponNamesizeof(sWeaponName));
    
PrintToChat(client"%s"sWeaponName);
    
PrintToChat(client"IncGrendae: %d"GetEntData(clientFindDataMapOffs(client"m_iAmmo")+56));
    
PrintToChat(client"HEGrenade: %d"GetEntData(clientFindDataMapOffs(client"m_iAmmo")+44));
    
PrintToChat(client"SmokeGrenade: %d"GetEntData(clientFindDataMapOffs(client"m_iAmmo")+52));

here is a video showing the weird ass result


Last edited by 8guawong; 12-27-2014 at 19:10.
8guawong 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 07:12.


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