|
发表于 2013-12-24 09:38:40
|
显示全部楼层
来自 中国–河北–石家庄
给你一个参考用吧- /* ammx编写头版 by Devzone*/
- #include <amxmodx>
- #include <fakemeta>
- #define PLUGIN "SXEmoney"
- #define VERSION "1.0"
- #define AUTHOR "DSHGFHDS"
- new bool:NOSXE[33]
- new cvar_money
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_event("HLTV", "Event_RoundStart", "a", "1=0", "2=0")
- cvar_money = register_cvar("SXE_givemoney", "100") //奖励多少钱
- }
- public client_putinserver(iPlayer)
- {
- static classname[33]
- pev(iPlayer, pev_netname, classname, charsmax(classname))
- if(contain(classname, "[NO-SXE]")) NOSXE[iPlayer] = true
- }
- public client_disconnect(iPlayer) NOSXE[iPlayer] = false
- public Event_RoundStart()
- {
- for(new i = 0; i < 33; i ++)
- {
- if(!is_user_connected(i))
- continue
-
- if(NOSXE[i])
- {
- client_print(i, print_chat, "由于你没有使用MP反作弊器,无法获得每局%d奖金", get_pcvar_num(cvar_money))
- continue
- }
-
- client_print(i, print_chat, "由于你使用了MP反作弊器,获得每局%d奖金", get_pcvar_num(cvar_money))
- give_user_money(i, get_pcvar_num(cvar_money))
- }
- }
- stock give_user_money(iPlayer, money)
- {
- money = min(get_pdata_int(iPlayer, 115, 5)+money, 16000)
- set_pdata_int(iPlayer, 115, money, 5)
- message_begin(MSG_ONE, get_user_msgid("Money"), {0,0,0}, iPlayer)
- write_long(money)
- write_byte(1)
- message_end()
- }
复制代码 |
|