AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   cs_get_user_deaths & get_user_deaths (https://forums.alliedmods.net/showthread.php?t=20416)

uTg | bigpapajiggs 11-07-2005 23:46

cs_get_user_deaths & get_user_deaths
 
I was wondering what the difference between cs_get_user_deaths and get_user_deaths was. Obviously one is for CS, but if I were to use just get_user_deaths, would it work in CS?

XxAvalanchexX 11-07-2005 23:52

CS:

Code:
return *((int *)pPlayer->pvPrivateData + OFFSET_CSDEATHS);

Regular:

Code:
return (cell)(pPlayer->ingame ? pPlayer->deaths : 0);

Basically regular get_user_deaths returns the player's variable named "deaths", while CS returns a private data offset. I'm guessing this means that CS doesn't use the traditional variable for storing a player's deaths, but I'm not sure why.

cybermind 11-08-2005 22:22

Quote:

Originally Posted by XxAvalanchexX
I'm guessing this means that CS doesn't use the traditional variable for storing a player's deaths, but I'm not sure why.

Pretty much everything in CS uses some alternative offset and not the variable provided by the SDK for the same purpose.


All times are GMT -4. The time now is 23:43.

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