[EXTENSION] CSteamID - SteamIDs as 64bit integers
CSteamID
v1.0.1 Description: Provides some native functions for converting to and from SteamIDs stored as 64-bit integers. Natives: PHP Code:
http://forums.alliedmods.net/showthr...52#post1800652 |
Re: [EXTENSION] CSteamID - SteamIDs as 64bit integers
Updated to version 1.0.1
|
Re: [EXTENSION] CSteamID - SteamIDs as 64bit integers
Doesnt it need a plugin to actually call the conversion? Like cbaseservertest to call the extension?
|
Re: [EXTENSION] CSteamID - SteamIDs as 64bit integers
I'm just providing the natives for people to use in their plugins, how they use these functions is up to them.
|
Re: [EXTENSION] CSteamID - SteamIDs as 64bit integers
can u make it for L4D?
or for all Source engine? |
Re: [EXTENSION] CSteamID - SteamIDs as 64bit integers
Nope, it will only work for OB mods.
|
Re: [EXTENSION] CSteamID - SteamIDs as 64bit integers
Now that I think about it, I can make it so that this will work on any other mod. The only downside is that the "GetClientCSteamID" native won't work. You'll still be able to use the other two functions just fine though.
|
Re: [EXTENSION] CSteamID - SteamIDs as 64bit integers
I hope this will be integrated into default sourcemod API. Looks very useful for the unification of identation.
|
Re: [EXTENSION] CSteamID - SteamIDs as 64bit integers
Note: I haven't tried this code, I was just examining the sourcecode.
Maybe I'm missing something, but the source code for one of the conversions seems to be off. More specifically, in SteamIDToCSteamID you add 76561197960265728 to the number in the Steam ID to get a steamcommunity ID. However, CSteamIDToSteamID does not subtract this number from the steamcommunity ID you pass in before being displayed. |
Re: [EXTENSION] CSteamID - SteamIDs as 64bit integers
That's because SteamIDToCSteamID is a hackish conversion, but is easier on the processing than that proper method. CSteamIDToSteamID does it properly. It's a bit more complex than this, but you can't understand it without understanding the CSteamID class and how they work, the page on the VDC is largely incorrect in how SteamIDs function.
|
All times are GMT -4. The time now is 10:10. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.