|
发表于 2012-10-27 00:57:09
|
显示全部楼层
|阅读模式
来自 中国–广东–深圳
如题“怎么读取Psychostats3.1数据库SQL中的中文ID”
- /* PS3 Stats - Psychostats3 in-game statistic v. 1.0
- Author: GeroiN
- E-Mail: maxim<.at.>osetia.org
- Homepage: http://portal.kaliningrad.ru
- */
- #include <amxmodx>
- #include <amxmisc>
- #include <sqlx>
- //#include <dbi>
- #include "li_geoip"
- #include <fakemeta>
- #include <memhack>
- #define PLUGIN "PS3 - stats rank top15"
- #define VERSION "1.0"
- #define AUTHOR "GeroiN"
- #define SAYRANK 1
- #define SAYTOP15 2
- #define GETUNIQUEID 3
- #define ENTERRANK 4
- //#define PSDEBUG
- #define MAX_BUFFER_LENGTH 2047
- // Global vars
- new Handle:g_DbInfo
- new g_psprefix[64]
- new g_QueryNum
- new g_Type[32]
- new g_JoinedTeam[33]
- new szName[32]
- new g_msgid
- new g_SpecMode[33]
- stock get_name(id, name[], len)
- {
- new buffer = engfunc(EngFunc_GetInfoKeyBuffer, id)
- new strtmp1[256]
- copy_infokey_buffer(buffer, strtmp1, 255)
- new offset = contain(strtmp1, "\name") + 6
- new thischr
- new i
- for (;;i++)
- {
- thischr = memhack_get_char(buffer + offset + i, MEM_NULLBASE, MEMTYPE_DATA, MEM_SIGNED)
- if (thischr == '\' || thischr == 0)
- {
- name[i] = 0
- break
- }
- else
- {
- name[i] = thischr
- }
-
- }
- name[len - 1] = 0
- }
复制代码 代码发不出来,字数超限制,发附件,
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|