广告广告
  加入我的最爱 设为首页 风格修改
首页 首尾
 手机版   订阅   地图  繁体 
您是第 1173 个阅读者
 
发表文章 发表投票 回覆文章
  可列印版   加为IE收藏   收藏主题   上一主题 | 下一主题   
Alan.
个人头像
个人文章 个人相簿 个人日记 个人地图
小人物
级别: 小人物 该用户目前不上站
推文 x41 鲜花 x31
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片
推文 x0
[1.6][插件] 改sma~help~
如果要改做这个指令只给ct,how to 修改。

[
#include <amxmodx>
#include <cstrike>
#include <fun>
#define DEBUG
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")
 new Float:maptime = get_cvar_float("mp_timelimit")
 if (maptime == 0.0)
  maptime = 15.0
 new Float:anntime = 60.0 * 5.0 // 5 minutes
 if (maptime < 5.0)
  anntime = maptime / 3.0
        set_task(anntime, "Announcement", 0, "", 0, "b")
}
public client_putinserver(id) {
 set_task(25.0, "Announcement", id)
 return PLUGIN_CONTINUE
}
public Announcement(id) {
 client_print(id, print_chat, "警察可以买AK47 & M4A1 [say /m4 & say /ak]")
}
public M4(id) {
 new m4cost = get_cvar_num("m4cost")
        new money = cs_get_user_money(id)
 if(!is_user_alive(id)) {
  client_print(id,print_chat,"活着才能买^n")
  }
 if(money < m4cost) {
  client_print(id,print_chat,"现金不足^n")
 }
 else {
  cs_set_user_money(id,money-m4cost)
                give_item(id, "weapon_m4a1")
 }
}
public AK(id) {
 new akcost = get_cvar_num("akcost")
        new moneyy = cs_get_user_money(id)
 if(!is_user_alive(id)) {
  client_print(id,print_chat,"活着才能买^n")
  }
 if(moneyy < akcost) {
  client_print(id,print_chat,"现金不足^n")
 }
 else {
  cs_set_user_money(id,moneyy-akcost)
                give_item(id, "weapon_ak47")
 }
}



献花 x0 回到顶端 [楼 主] From:香港城市电讯 | Posted:2011-01-16 12:43 |
tw2twtw
个人头像
个人文章 个人相簿 个人日记 个人地图
小有名气
级别: 小有名气 该用户目前不上站
推文 x50 鲜花 x548
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

public M4(id) {
if(cs_get_user_team(id) == CS_TEAM_CT)
{
new m4cost = get_cvar_num("m4cost")
    new money = cs_get_user_money(id)
if(!is_user_alive(id)) {
client_print(id,print_chat,"活着才能买^n")
}
if(money < m4cost) {
client_print(id,print_chat,"现金不足^n")
}
else {
cs_set_user_money(id,money-m4cost)
          give_item(id, "weapon_m4a1")
}
}
}
public AK(id) {
if(cs_get_user_team(id) == CS_TEAM_CT)
{
new akcost = get_cvar_num("akcost")
    new moneyy = cs_get_user_money(id)
if(!is_user_alive(id)) {
client_print(id,print_chat,"活着才能买^n")
}
if(moneyy < akcost) {
client_print(id,print_chat,"现金不足^n")
}
else {
cs_set_user_money(id,moneyy-akcost)
          give_item(id, "weapon_ak47")
}
}
}


我用if(cs_get_user_team(id) == CS_TEAM_CT)
把整个指令框起来....试试看吧((不行别怪我~ 表情
把public M4(id)之后的全部覆盖


我的SV: 59.126.178.46:27015
模式:乱七八糟?
献花 x1 回到顶端 [1 楼] From:台湾中华电信 | Posted:2011-01-16 13:08 |
Alan.
个人头像
个人文章 个人相簿 个人日记 个人地图
小人物
级别: 小人物 该用户目前不上站
推文 x41 鲜花 x31
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

ok了~


献花 x0 回到顶端 [2 楼] From:香港城市电讯 | Posted:2011-01-16 14:53 |

首页  发表文章 发表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.016720 second(s),query:16 Gzip disabled
本站由 瀛睿律师事务所 担任常年法律顾问 | 免责声明 | 本网站已依台湾网站内容分级规定处理 | 连络我们 | 访客留言