fz12
发表于 2010-6-11 20:39:56
生日快乐,收下这个礼物
ReD无名
发表于 2010-6-11 23:41:03
有点意思!看下!
Pro
发表于 2010-6-20 17:42:40
支持下支持下
thunderson
发表于 2010-6-20 19:22:54
/* UTF-8 func by www.DT-Club.net */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <unlimited_money>
new bool:buyswitch
public plugin_init() {
register_plugin("buyweapon","1.0","bruto")
register_concmd("amx_buy", "adminbuy", ADMIN_SLAY, " - AMXX ADMIN BUY WEAPON SCRIPT")
register_clcmd("say /m4","M4")
register_clcmd("say /fa","FA")
register_clcmd("say /ak","AK")
register_clcmd("say /ga","GA")
register_cvar("m4cost","3100")
register_cvar("facost","2250")
register_cvar("akcost","2500")
register_cvar("gacost","2000")
register_logevent("round_start",2,"0=World triggered","1=Round_Start")
register_event("HLTV","eResetHUD","a","a=0","2=0")
}
public adminbuy(id, level, cid){
if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED
new Arg1
read_argv(1, Arg1, 3)
if(equali(Arg1,"m4")){
give_item(id, "weapon_m4a1")
cs_set_user_bpammo(id,CSW_M4A1,90)
cs_set_user_armor(id,100,CS_ARMOR_VESTHELM)
console_print(id,"bruto:give me the m4!")
return PLUGIN_CONTINUE
}
if(equali(Arg1,"ak")){
give_item(id, "weapon_ak47")
cs_set_user_bpammo(id,CSW_AK47,90)
cs_set_user_armor(id,100,CS_ARMOR_VESTHELM)
console_print(id,"bruto:give me the ak!")
return PLUGIN_CONTINUE
}
if(equali(Arg1,"fa")){
give_item(id, "weapon_famas")
cs_set_user_bpammo(id,CSW_FAMAS,90)
cs_set_user_armor(id,100,CS_ARMOR_VESTHELM)
console_print(id,"bruto:give me the fa!")
return PLUGIN_CONTINUE
}
if(equali(Arg1,"ga")){
give_item(id, "weapon_galil")
cs_set_user_bpammo(id,CSW_GALIL,90)
cs_set_user_armor(id,100,CS_ARMOR_VESTHELM)
console_print(id,"bruto:give me the ga!")
return PLUGIN_CONTINUE
}
if(equali(Arg1,"awp")){
give_item(id, "weapon_awp")
cs_set_user_bpammo(id,CSW_AWP,30)
cs_set_user_armor(id,100,CS_ARMOR_VESTHELM)
console_print(id,"bruto:give me the awp!")
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
public round_start(id) {
client_print(id, print_chat, "警察可以购买AK,GA匪徒可以购买M4,FA 输入")
}
public M4(id) {
new m4cost = get_cvar_num("m4cost")
new moneyy = cs_get_user_money2(id)
if(!is_user_alive(id)) {
client_print(id,print_chat,"你已经死亡,不能购买")
return PLUGIN_CONTINUE
}
if(moneyy < m4cost) {
client_print(id,print_chat,"你的金钱不够")
return PLUGIN_CONTINUE
}
if (cs_get_user_hasprim(id)) {
client_print(id,print_chat,"你已经拥有一个主武器了")
return PLUGIN_CONTINUE
}
if(!cs_get_user_buyzone(id)){
client_print(id,print_chat,"你只能在购买区内购买武器")
return PLUGIN_CONTINUE
}
if(!buyswitch){
client_print(id,print_chat,"购买时间已过")
return PLUGIN_CONTINUE
}
else {
cs_set_user_money2(id,moneyy-m4cost)
give_item(id, "weapon_m4a1")
}
return PLUGIN_CONTINUE
}
public FA(id) {
new facost = get_cvar_num("facost")
new moneyy = cs_get_user_money2(id)
if(!is_user_alive(id)) {
client_print(id,print_chat,"你已经死亡,不能购买")
return PLUGIN_CONTINUE
}
if(moneyy < facost) {
client_print(id,print_chat,"你的金钱不够")
return PLUGIN_CONTINUE
}
if (cs_get_user_hasprim(id)) {
client_print(id,print_chat,"你已经拥有一个主武器了")
return PLUGIN_CONTINUE
}
if(!cs_get_user_buyzone(id)){
client_print(id,print_chat,"你只能在购买区内购买武器")
return PLUGIN_CONTINUE
}
if(!buyswitch){
client_print(id,print_chat,"购买时间已过")
return PLUGIN_CONTINUE
}
else {
cs_set_user_money2(id,moneyy-facost)
give_item(id, "weapon_famas")
}
return PLUGIN_CONTINUE
}
public AK(id) {
new akcost = get_cvar_num("akcost")
new moneyy = cs_get_user_money2(id)
if(!is_user_alive(id)) {
client_print(id,print_chat,"你已经死亡,不能购买")
return PLUGIN_CONTINUE
}
if(moneyy < akcost) {
client_print(id,print_chat,"你的金钱不够")
return PLUGIN_CONTINUE
}
if (cs_get_user_hasprim(id)) {
client_print(id,print_chat,"你已经拥有一个主武器了")
return PLUGIN_CONTINUE
}
if(!cs_get_user_buyzone(id)){
client_print(id,print_chat,"你只能在购买区内购买武器")
return PLUGIN_CONTINUE
}
if(!buyswitch){
client_print(id,print_chat,"购买时间已过")
return PLUGIN_CONTINUE
}
else {
cs_set_user_money2(id,moneyy-akcost)
give_item(id, "weapon_ak47")
}
return PLUGIN_CONTINUE
}
public GA(id) {
new gacost = get_cvar_num("gacost")
new moneyy = cs_get_user_money2(id)
if(!is_user_alive(id)) {
client_print(id,print_chat,"你已经死亡,不能购买")
return PLUGIN_CONTINUE
}
if(moneyy < gacost) {
client_print(id,print_chat,"你的金钱不够")
return PLUGIN_CONTINUE
}
if (cs_get_user_hasprim(id)) {
client_print(id,print_chat,"你已经拥有一个主武器了")
return PLUGIN_CONTINUE
}
if(!cs_get_user_buyzone(id)){
client_print(id,print_chat,"你只能在购买区内购买武器")
return PLUGIN_CONTINUE
}
if(!buyswitch){
client_print(id,print_chat,"购买时间已过")
return PLUGIN_CONTINUE
}
else {
cs_set_user_money2(id,moneyy-gacost)
give_item(id, "weapon_galil")
}
return PLUGIN_CONTINUE
}
public eResetHUD(){
new Float:buytime=get_cvar_float("mp_buytime")*60
buyswitch=true
set_task(buytime,"buy")
}
public buy()
{
buyswitch=false
}
yangderui025
发表于 2010-8-18 08:15:18
我顶你一个。。。。。。。。。。
敷衍的青春
发表于 2010-10-24 11:46:00
下载~~~~~~~~~~
小白
发表于 2010-10-24 11:54:39
额。。谢谢楼主
hjm520
发表于 2010-10-24 12:25:09
生日快乐
jameeyre
发表于 2010-10-24 14:28:10
我找源码来了..
z6125711
发表于 2010-10-24 14:49:43
我早有了,这个插件
页:
1
2
3
[4]
5
6
7
8
9
10
11