搜索
查看: 2627|回复: 6

警察和土匪可以买AK和M4的插件修改请教!!!

[复制链接]
前世风今生雨 该用户已被删除
发表于 2008-2-13 15:20:54 | 显示全部楼层 |阅读模式 来自 重庆万州区
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2008-2-13 16:10:05 | 显示全部楼层 来自 北京海淀

回复: 警察和土匪可以买AK和M4的插件修改请教!!!

游戏中输入say /m4 活着say /ak
回复

使用道具 举报

发表于 2008-2-13 23:01:31 | 显示全部楼层 来自 广东深圳

回复: 警察和土匪可以买AK和M4的插件修改请教!!!

[PHP]/* 本插件由 AMXX-Studio 中文版自动生成*/
/* UTF-8 func by www.DT-Club.net */
#include <amxmodx>
#include <cstrike>
#include <fun>
//#define DEBUG
new bool:buyswitch
public plugin_init() {
register_plugin("buy m4&ak","2.3","kid741010")
register_clcmd("say /m4","M4")
register_clcmd("say /ak","AK")
register_cvar("m4cost","3100")
register_cvar("akcost","2500")
register_logevent("round_start",2,"0=World triggered","1=Round_Start")
//1.5就用这句
register_event("ResetHUD", "eResetHUD", "be")
//1.6就用这句
//register_event("HLTV","eResetHUD","a","a=0","2=0")
}
public M4(id) {
new m4cost = get_cvar_num("m4cost")
new money = cs_get_user_money(id)
if(!is_user_alive(id)) {
client_color(id, id, "^x04 Ti Shi^x03 You Are Dead?")
//client_print(id,print_chat,"Huo Zhe Mai^n")
return PLUGIN_CONTINUE
}
if(money < m4cost) {
client_color(id, id, "^x04 Ti Shi^x03 Huo Zhe Mai?")
return PLUGIN_CONTINUE
}
if (cs_get_user_hasprim(id)){ //增加行
client_color(id, id, "^x04 Ti Shi^x03 Mai BU le?^n")
return PLUGIN_CONTINUE
}
if(!buyswitch){
client_color(id, id, "^x04 Ti Shi ^x03 Shi JIan BU Gou!")
return PLUGIN_CONTINUE
}
else {
cs_set_user_money(id,money-m4cost)
give_item(id, "weapon_m4a1")
cs_set_user_bpammo(id,CSW_M4A1,90)
}
return PLUGIN_CONTINUE
}
public AK(id) {
new akcost = get_cvar_num("akcost")
new moneyy = cs_get_user_money(id)
if(!is_user_alive(id)) {
client_color(id, id, "^x04 Ti Shi ^x03 You Are Dead ?")
return PLUGIN_CONTINUE
}
if(moneyy < akcost) {
client_color(id, id, "^x04 Ti Shi ^x03 mai bu le?")
return PLUGIN_CONTINUE
}
if (cs_get_user_hasprim(id)) { //增加行
client_color(id, id, "^x04 Ti Shi^x03mai bu le?^n")
return PLUGIN_CONTINUE
}
if(!buyswitch){
client_color(id, id, "^x04 Ti Shi^x03shijiabugou!")
return PLUGIN_CONTINUE
}
else {
cs_set_user_money(id,moneyy-akcost)
give_item(id, "weapon_ak47")
cs_set_user_bpammo(id,CSW_AK47,90)
}
return PLUGIN_CONTINUE
}
public eResetHUD()
{
new Float:buytime=get_cvar_float("mp_buytime")*60
buyswitch=true
set_task(buytime,"buy")
}

public round_start()
{
client_print(0,print_chat,"Ct Ke yi Buy AK & T ke yi buy M4a1 say/m4 & say/ak")

}
public client_color(playerid, colorid, msg[])
{
message_begin(playerid?MSG_ONE:MSG_ALL,get_user_msgid("SayText"),_,playerid)
write_byte(colorid)
write_string(msg)
message_end()
} [/PHP]
回复

使用道具 举报

前世风今生雨 该用户已被删除
 楼主| 发表于 2008-2-14 13:04:34 | 显示全部楼层 来自 重庆万州区
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2010-6-20 16:25:44 | 显示全部楼层 来自 北京
编译不了啊,怎么搞得?
回复

使用道具 举报

发表于 2010-6-24 21:41:33 | 显示全部楼层 来自 北京
能否给一个能限定购买时间和地点的?
回复

使用道具 举报

发表于 2010-10-1 15:05:57 | 显示全部楼层 来自 广西桂林
我想要个权限的
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表