SMA檔裡的<cstrike>指令說明

Home Home
<< 1 2 >>
跳頁: (共 2 頁)
引用 | 編輯 Rubbish-Nec
2010-01-11 13:58
樓主
推文 x11
注意:這個是學a78大的,發這帖是用來教人怎樣用<cstrike>內的東西(其實是騙錢)
   小弟入世未深,可能會大錯特錯,歡迎叫我更改
   高手如果會請解釋我不明白的東西
   排版醜不要打我

簡單來說<cstrike>就是寫CS內發生的事件

一、紀錄死亡次數
cs_get_user_deaths(index)

二、設定此人的死亡次數
cs_set_user_deaths(index, newdeaths)

事例:
if(cs_get_user_deaths(index) = 10)
{
          cs_set_user_deaths(index, 0)
}
如果index的死亡次數是10死亡次數變成0

三、判斷人質是否跟隨一些東西(不一定是玩家)
cs_get_hostage_foll(index)

四、設定人質跟隨一些東西(followedindex是跟隨什麼,不一定是玩家,如果0就是停止跟隨)
cs_set_hostage_foll(index, followedindex = 0)

五、取得這個人質的id
cs_get_hostage_id(index)

事例:
new rubbish = cs_get_hostage_id(index)

if(cs_get_hostage_foll(rubbish))
{
     cs_set_hostage_foll(rubbish, 0)
}

讓一個人質叫rubbish如果rubbish在跟隨一些東西停止他

六、取得這人的槍所用的子彈數量(weapon就是CSW_XXX的XXX)
cs_get_user_bpammo(index, weapon)

相同子彈種類的武器
 * awm
 * scout, ak, g3
 * m249
 * famas, m4a1, aug, sg550, galil, sg552
 * m3, xm
 * usp, ump, mac
 * fiveseven, p90
 * deagle
 * p228
 * glock, mp5, tmp, elites
 * flash
 * he
 * smoke

七、給這人槍所用的子彈數量(weapon同上,amount是數量)
cs_set_user_bpammo(index, weapon, amount)

事例:
new ammo = cs_get_user_bpammo(index, awm)

if(ammo < 10)
{
     cs_set_user_bpammo(index, awm, 30)
}

讓inex的awp的子彈數量叫ammo

如果子彈少於10的話,給他30顆子彈

八、判斷這人有沒有拆彈器
cs_get_user_defuse(index)

九、設定這人的拆彈器
(defusekit = 0就是沒有,1就是有)
(r = 0 ,g = 160,b = 0   就是設定左面icon的顏色)
(icon就是左面icon的圖樣,不建議修改)
(flash就是令圖示變得閃閃的)
cs_set_user_defuse(index, defusekit = 1, r = 0, g = 160, b = 0, icon[] = "defuser", flash = 0)

註:因為有拆彈器的都是CT,所以不用設定隊伍

事例:
if(!cs_get_user_defuse(index))
{
     cs_set_user_defuse(index, 1, 0, 200, 0, "defuser",0)
}

如果index這個笨CT沒有拆彈包就給他一個拆彈包

十、判斷這人是否在購買區域
cs_get_user_buyzone(index)

十一、判斷這人是否有槍或是盾牌
cs_get_user_hasprim(index)

十二、取得這人的模型(即是SAS.URBAN,GIGN等等)
cs_get_user_model(index, model[], len)

十三、設定這人的模型(const model[] 就是SAS.URBAN,GIGN等等)
cs_set_user_model(index, const model[])

事例:
if(cs_get_user_model(index, SAS, 1)
{
cs_set_user_model(index, gign)
}

如果index選擇用sas設定他變成gign


十四、取得index的錢的數量
cs_get_user_money(index)

十五、設定錢的數量(flash是要有變色效果嗎 0 = 否 1 =是)
cs_set_user_money(index, money, flash = 1)

事例:
if(!cs_get_user_deaths(index))
{
     cs_set_user_money(index, cs_get_user_money(index) + 2000, flash = 1)
}

如果index死不掉就增加2000元

十六、判斷這人是否有夜視鏡
cs_get_user_nvg(index)

十七、設定這人的夜視鏡(nvgoggles 0是沒有、1就是有
cs_set_user_nvg(index, nvgoggles = 1)

事例:

if(!cs_get_user_nvg(index))
{
     cs_set_user_nvg(index,1)
}

如果index沒有夜視鏡就給他一個

十八、判斷index是否裝了c4炸彈
cs_get_user_plant(index)

十九、設定index裝炸彈(plant = 1是令index在裝彈區域內自動裝c4,showbombicon就是有個綠色圖示吧)
cs_set_user_plant(index, plant = 1, showbombicon = 1)

事例:

if(!cs_get_user_plant(index))
{
     cs_set_user_plant(index, 1, 1)
}

如果index沒有裝c4炸彈就要他裝炸彈

二十、我囧,設定這人的隊伍
cs_set_user_team(index, {CsTeams,_}:team, {CsInternalModel,_}:model = CS_DONTCHANGE)

{CsTeams,_}:team是
1 = 恐怖份子
 2 = 反恐精英
 3 = 觀察者

{CsInternalModel,_}:model是
不轉換 = 0,
URBAN = 1,
TERROR = 2,
LEET = 3,
ARCTIC = 4,
GSG9 = 5,
GIGN = 6,
SAS = 7,
GUERILLA = 8,
VIP = 9,
MILITIA = 10,(CZ的)
SPETSNAZ = 11(CZ的)

二十一、取得這人的隊伍(同上)
cs_get_user_team(index, &{CsInternalModel,_}:model = CS_DONTCHANGE)

事例:

if(cs_get_user_team(index, 7)
{
     cs_set_user_team(index,2,6)
}

如果index是用sas的轉變為gign

二十二、判斷這人是否VIP(護送他到營救地區的那種)
cs_get_user_vip(index)

二十三、設定這人是否VIP(vip = 1就成為VIP,model = 1就會轉換模組,scoreboard  = 1就會在比分板顯示他是VIP
cs_set_user_vip(index, vip = 1, model = 1, scoreboard = 1)

事例:
if(cs_get_user_vip(index))
{
     cs_set_user_vip(index, 0, 1, 1)
}

如果index是VIP就取消他VIP的資格

二十四、判斷這人有沒有殺隊友
cs_get_user_tked(index)

二十五、設定這人殺隊友(tk = 1就是當作tk)(subtrack = 1就會減殺人次數)
cs_set_user_tked(index, tk = 1, subtract = 1)

事例:
if(cs_get_user_tked(index))
{
     user_kill(index,0)
}

如果index殺了隊友殺了他

註:藍色部分需用到<amxmodx>模塊

二十六、判斷這人有沒有駕車(題外話:CS內的車子很奇怪,有些可以凌空『飛』)
cs_get_user_driving(index)

二十七、判斷這人有沒有拿盾
cs_get_user_shield(index)

二十八、判斷這人有沒有使用地圖內的機槍(需要按"E"用的那種)
cs_get_user_stationary(index)

二十九、判斷這人有沒有護甲
cs_get_user_armor(index, &CsArmorType:armortype)

三十、設定這人的護甲(armorvalue是多少護甲)
cs_set_user_armor(index, armorvalue, CsArmorType:armortype)

CsArmorType:armortype就是:
 0 = 沒有護甲
 1 = 只有裝甲,沒有頭盔(650元那種)
 2 = 裝甲和頭盔都有

事例:
if(cs_get_user_armor(index, 0))
{
     cs_set_user_armor(index, 100, 2)
}

如果index沒有護甲就送他100護甲(還連頭盔呢)

註:cs_get_user_armor(index, 0)的話就代表沒有護甲

不用再!cs_get_user_armor(index, 0)了




我太懶了,還沒完……(一天寫幾個,輕鬆又快樂)

獻花 x5
引用 | 編輯 tunggods30
2010-01-11 14:16
1樓
  
好像不錯呢
謝下~~~表情

獻花 x0
引用 | 編輯 supermanhugo
2010-01-11 14:52
2樓
  
我還以為
cs_get_user_deaths是指玩家的死亡次數Orz

--------------------------------------------------------------------

new ammo = cs_get_user_bpammo(index, awm)

if(ammo < 10)
{
    cs_set_user_bpammo(index, awm, 30)
}

( 是awp吧)
這裡填的是CSW_AWP

--------------------------------------------------------------------
cs_get_user_hasprim :
當玩家有大槍或盾時回傳1,非即回傳0

--------------------------------------------------------------------
const model[] 是指一個字串
如果你想這個人的模組變成arctic,就填"arctic"
(請參考models/player/

獻花 x0
引用 | 編輯 a7811311622
2010-01-11 16:31
3樓
  
我記得"get_user_deaths(index)"的確是讀取死亡次數啊…
如果是判斷是否死亡就用<amxmodx>的"is_user_alive(index)"就可以啦…
(話說"cs_get_user_plant(index)"下面的內容是還沒排嗎?)

獻花 x0
引用 | 編輯 supermanhugo
2010-01-11 17:07
4樓
  
話說,我比較想看engine系列的說明的說Orz
(最近都在研究

獻花 x0
引用 | 編輯 Rubbish-Nec
2010-01-11 17:33
5樓
  
下面是引用 a7811311622 於 2010-01-11 16:31 發表的 : 到引言文
我記得"get_user_deaths(index)"的確是讀取死亡次數啊…
如果是判斷是否死亡就用<amxmodx>的"is_user_alive(index)"就可以啦…
(話說"cs_get_user_plant(index)"下面的內容是還沒排嗎?)

這是因為我比較懶,不太想一次就寫完表情

上面的錯處已經修改好,感謝各位

獻花 x0
引用 | 編輯 apple20612
2010-01-11 17:36
6樓
  
有沒有製作插件的教學啊

好想自己做一個來試試~~

獻花 x0
引用 | 編輯 yymmychat
2010-01-11 18:40
7樓
  
很實用的教學,且文章編排清楚整齊,讓人很容易看的明 表情 表情
GOOD!~

獻花 x0
引用 | 編輯 chuchung712
2010-01-11 19:24
8樓
  
para即是M249喔!

獻花 x0
引用 | 編輯 eadwe147
2010-01-11 21:30
9樓
  
看起來不錯 表情

雖然我看不懂 表情

+1推

獻花 x0
引用 | 編輯 森之千手
2010-01-11 22:39
10樓
  
對我很有用呢^^謝大大

獻花 x0
引用 | 編輯 HsK
2010-01-13 07:37
11樓
  
推推   有用時來找你^^

獻花 x0
引用 | 編輯 01a2Bc3DeF
2010-01-13 19:14
12樓
  
使用一、二、三等順序看起來極醜,若沒順序關係那在文後打上總共有幾條就好了 表情
內容不錯

獻花 x0
引用 | 編輯 supermanhugo
2010-01-13 19:36
13樓
  
cs_get_user_stationary

好像是指那些需要按"E"用的槍(不肯定)

獻花 x0
引用 | 編輯 a7811311622
2010-01-14 00:20
14樓
  
下面是引用 supermanhugo 於 2010-01-13 19:36 發表的 : 到引言文
cs_get_user_stationary

好像是指那些需要按"E"用的槍(不肯定)

什麼是「需要按"E"用的槍」啊?表情

獻花 x0
引用 | 編輯 supermanhugo
2010-01-14 18:00
15樓
  
下面是引用 a7811311622 於 2010-01-14 00:20 發表的 : 到引言文
 
什麼是「需要按"E"用的槍」啊?表情

座地式的那種吧(?)

獻花 x0
引用 | 編輯 a7811311622
2010-01-14 18:11
16樓
  
下面是引用 supermanhugo 於 2010-01-14 18:00 發表的 : 到引言文


座地式的那種吧(?)

喔~你指的是有些地圖會有機槍之類的武器吧?大概知道了。

獻花 x0
引用 | 編輯 supermanhugo
2010-01-14 18:25
17樓
  
下面是引用 a7811311622 於 2010-01-14 18:11 發表的 : 到引言文
 
喔~你指的是有些地圖會有機槍之類的武器吧?大概知道了。

嗯嗯,就是那種

獻花 x0
引用 | 編輯 AykinDalike
2010-01-14 19:14
18樓
  

這文章真的不錯
很有心在研究
給你個推薦+花~
再接再厲喔~ 表情

獻花 x0
引用 | 編輯 24149421
2010-02-20 08:37
19樓
  
樓主!!真利害!!雖然我不明 但還是想樓主利害

獻花 x0
引用 | 編輯 killer699
2010-02-20 14:29
20樓
  
index

是否指禁書目錄中的那一位表情

獻花 x0
引用 | 編輯 |qw≡GLλDOS|
2010-02-21 16:07
21樓
  
下面是引用 chuchung712 於 2010-01-11 19:24 發表的 : 到引言文
para即是M249喔!
=口=我都不知道

獻花 x0
引用 | 編輯 tocade
2010-03-25 18:29
22樓
  
初學者來報到
收穫很多
期待還有下一篇教學
表情

獻花 x0
引用 | 編輯 loveshindd
2010-07-01 13:19
23樓
  
需要慢慢看~

獻花 x0
引用 | 編輯 loveshindd
2010-07-02 13:54
24樓
  
很有用!!

獻花 x0
引用 | 編輯 andrew5579
2010-07-02 20:55
25樓
  
很複雜= =
完全不明白

獻花 x0
引用 | 編輯 i-c0112
2010-07-17 19:20
26樓
  
為什麼stationary是機槍 表情
我的英文有這麼的破嗎?? 表情

獻花 x0
引用 | 編輯 nameless95
2010-07-19 18:31
27樓
  
好實用 3q 希望大大繼續發這麼有用的文章

獻花 x0
引用 | 編輯 vwycwy
2010-07-25 21:55
28樓
  
有點不明.係未要係~到打果d指令?

獻花 x0
引用 | 編輯 784063999
2010-09-11 22:22
29樓
  
我想你快點把其他的打上去
我不懂cs_set_weapon_ammo是怎用

獻花 x0
<< 1 2 >>
跳頁: (共 2 頁)