廣告廣告
  加入我的最愛 設為首頁 風格修改
首頁 首尾
 手機版   訂閱   地圖  簡體 
您是第 1170 個閱讀者
 
發表文章 發表投票 回覆文章
  可列印版   加為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.020870 second(s),query:16 Gzip disabled
本站由 瀛睿律師事務所 擔任常年法律顧問 | 免責聲明 | 本網站已依台灣網站內容分級規定處理 | 連絡我們 | 訪客留言