弄个【三雷卡】的源码和插件来带说明怎么用
我最近找了好几个三雷卡都没用别人用就有用我就不能用为什么呢?谁发来源码和插件
要带说明怎么用啊,我用 了都不会用的 把插件发出来 /*
Plugin author { DT.Sakulekingz \ KIN \ KzFun.wUgu1 \ k1nader }
__....__ 1. DT.Sakulekingz is KIN,
.-~~/\__/\~~-. 2. KIN is KzFun.wUgu1,
/_/``\__/\__/``\_\.--. 3. KzFun.wUgu1 is k1nader,
/\__/\__/\__/\ o`. 4. k1nader is DT.Sakulekingz,
`==/\__/__\__/__\__/__\__/\`'--' 5. so..DT.Sakulekingz = KIN = KzFun.wUgu1 = k1nader
~/__/__/^^^^^^^^\__\__\~ 6. DT.Sakuleking, KIN, KzFun.wUgu1, k1nader (the 4 names is me).
*/
#include <amxmodx>
#include <cstrike>
#include <fun>
#define PLUGIN "buy 3 hegrenade"
#define VERSION "1.0"
#define AUTHOR "k1nader"
new g_hegrenademoney;
new bool:buyswitch;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_menucmd(register_menuid("BuyItem", 1), 511, "menuItem");
register_event("HLTV", "roundstart", "a", "1=0", "2=0");
g_hegrenademoney = register_cvar("amx_buygrenade", "300");
}
public client_command(id)
{
new arg;
if(read_argv(0, arg, 12) > 11) return PLUGIN_CONTINUE;
if(equali(arg, "hegren"))
{
if(!cs_get_user_buyzone(id)) return PLUGIN_HANDLED;
if(!buyswitch)
{
client_print(id, print_center, "%d 秒已经过去了,你不能再买任何东西了。",floatround(get_cvar_float("mp_buytime")*60,floatround_round));
return PLUGIN_HANDLED;
}
new g_money = cs_get_user_money(id);
if(g_money < get_pcvar_num(g_hegrenademoney))
{
client_print(id, print_center, "你没有足够的资金!");
return PLUGIN_HANDLED;
}
new g_currentHE = cs_get_user_bpammo(id, CSW_HEGRENADE);
if(g_currentHE == 0)
{
give_item(id, "weapon_hegrenade");
cs_set_user_money(id, g_money - get_pcvar_num(g_hegrenademoney));
}
else
{
if(g_currentHE <= 2)
{
cs_set_user_money(id, g_money - get_pcvar_num(g_hegrenademoney));
cs_set_user_bpammo(id, CSW_HEGRENADE, g_currentHE+1);
}
else
client_print(id, print_center, "你不能再携带任何东西了。");
}
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
public menuItem(id, key)
{
if(key == 3)
{
if(!cs_get_user_buyzone(id)) return PLUGIN_HANDLED;
if(!buyswitch)
{
client_print(id, print_center, "%d 秒已经过去了,你不能再买任何东西了。",floatround(get_cvar_float("mp_buytime")*60,floatround_round));
return PLUGIN_HANDLED;
}
new g_money = cs_get_user_money(id);
if(g_money < get_pcvar_num(g_hegrenademoney))
{
client_print(id, print_center, "你没有足够的资金!");
return PLUGIN_HANDLED;
}
new g_currentHE = cs_get_user_bpammo(id, CSW_HEGRENADE);
if(g_currentHE == 0)
{
cs_set_user_money(id, g_money - get_pcvar_num(g_hegrenademoney));
give_item(id, "weapon_hegrenade");
}
else
{
if(g_currentHE <= 2)
{
cs_set_user_money(id, g_money - get_pcvar_num(g_hegrenademoney));
cs_set_user_bpammo(id, CSW_HEGRENADE, g_currentHE+1);
}
else
client_print(id, print_center, "你不能再携带任何东西了。");
}
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
public roundstart()
{
new Float:buytime = get_cvar_float("mp_buytime") * 60;
buyswitch = true;
set_task(buytime, "canntbuy");
}
public canntbuy()
buyswitch = false;:) 什么是三雷卡? /*
--------------------------------------------------------------------------------
Web URL:http: //t.qq.com/k1nader
E-M@IL: mailto: jon.ray@qq.com
--------------------------------------------------------------------------------
amx_grenade_money <300> 购买一个手雷多少钱
amx_grenade_access <p> 购买多个手雷需要什么权限
amx_grenade_num <3> 总共可以买多少颗手雷
*/
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "k1nader"
#define LOADING "^n^t%s v%s, Copyright (C) 2012 by %s^n"
new g_MsgidTextMsg, g_BuyNum, g_Buyaccess, g_Buymoney, Float:g_GameTime;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
server_print(LOADING,PLUGIN,VERSION,AUTHOR);
register_logevent("EventStartRound", 2, "0=World triggered", "1=Round_Start");
register_event("HLTV", "EventStartRound", "a", "1=0", "2=0");
register_menucmd(register_menuid("BuyItem", 1), 511, "menuItem");
g_Buymoney = register_cvar("amx_grenade_money", "300");
g_Buyaccess = register_cvar("amx_grenade_access", "p");
g_BuyNum = register_cvar("amx_grenade_num", "3");
g_MsgidTextMsg = get_user_msgid("TextMsg");
}
public EventStartRound()
g_GameTime = get_gametime();
public menuItem(id, key)
{
if(key == 3)
{
buy_hegren(id);
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
public client_command(id)
{
new arg;
if(read_argv(0, arg, 12) > 11) return PLUGIN_CONTINUE;
if(equali(arg, "hegren"))
{
buy_hegren(id);
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
public buy_hegren(id)
{
new Float:buytime, Float:timepassed, g_money, g_currentHE, CannotTime;
timepassed = get_gametime() - g_GameTime;
buytime = get_cvar_float("mp_buytime") * 60.0;
if(!is_user_connected(id)) return PLUGIN_HANDLED;
if(!cs_get_user_buyzone(id)) return PLUGIN_HANDLED;
if(floatcmp(timepassed , buytime) == 1)
{
num_to_str(floatround(get_cvar_float("mp_buytime") * 60.0, floatround_round), CannotTime, charsmax(CannotTime));
buy_message(id, "#Cant_buy", CannotTime);
return PLUGIN_HANDLED;
}
g_money = cs_get_user_money(id);
if(g_money < get_pcvar_num(g_Buymoney))
{
buy_message(id, "#Not_Enough_Money", "");
return PLUGIN_HANDLED;
}
g_currentHE = cs_get_user_bpammo(id, CSW_HEGRENADE);
if(g_currentHE == 0)
{
give_item(id, "weapon_hegrenade");
cs_set_user_money(id, g_money - get_pcvar_num(g_Buymoney));
}
else
{
new accessbuy;
get_pcvar_string(g_Buyaccess, accessbuy, charsmax(g_Buyaccess));
if(get_user_flags(id) & read_flags(accessbuy) == 0)
{
buy_message(id, "#Cannot_Carry_Anymore", "");
return PLUGIN_HANDLED;
}
if(g_currentHE <= (get_pcvar_num(g_BuyNum) - 1))
{
cs_set_user_bpammo(id, CSW_HEGRENADE, 0);
give_item (id, "weapon_hegrenade");
cs_set_user_bpammo(id, CSW_HEGRENADE, g_currentHE + 1);
cs_set_user_money(id, g_money - get_pcvar_num(g_Buymoney));
}
else
buy_message(id, "#Cannot_Carry_Anymore", "");
}
return PLUGIN_HANDLED;
}
public buy_message(id, message[], more[])
{
message_begin(MSG_ONE, g_MsgidTextMsg, _, id);
write_byte(4);
write_string(message);
if(strlen(more) > 0)
write_string(more);
message_end();
}买普通手雷的方法购买就行,只要有权限。
这个是最新的版本,基本上没BUG了。 sakulekingz 发表于 2012-4-26 15:23 static/image/common/back.gif
买普通手雷的方法购买就行,只要有权限。
这个是最新的版本,基本上没BUG了。 ...
这个不错。。。。 sakulekingz 发表于 2012-4-26 15:23 static/image/common/back.gif
买普通手雷的方法购买就行,只要有权限。
这个是最新的版本,基本上没BUG了。 ...
我怎么测试没效果的 fangxikai 发表于 2012-4-24 10:18 static/image/common/back.gif
都试试吧,谢谢了 sakulekingz 发表于 2012-4-26 15:23 static/image/common/back.gif
买普通手雷的方法购买就行,只要有权限。
这个是最新的版本,基本上没BUG了。 ...
不行啊 = = 我买不了手雷了 sakulekingz 发表于 2012-4-26 15:23 static/image/common/back.gif
买普通手雷的方法购买就行,只要有权限。
这个是最新的版本,基本上没BUG了。 ...
这是1.6的么= = 我要的是1.6的啊,哥们{:3_46:}
页:
[1]
2