|
发表于 2008-3-31 16:40:55
|
显示全部楼层
来自 中国–北京–北京–海淀区
回复: 问个弱智的问题,AMXX1.80与CS1.5
印象中get_weaponname,get_weaponid(好像是这么拼)这两个函数也不行。
edit:
今天测试了一下,1.80修正了这两个函数- public test(id)
- {
- new text[40]
- for(new i=1; i<=30; i++)
- {
- get_weaponname(i, text, 39)
- format(text, 39, "%d %s", get_weaponid(text), text)
- write_file("weapon.txt", text)
- }
- return PLUGIN_HANDLED
- }
复制代码 测试结果:1 weapon_p228
0
3 weapon_scout
4 weapon_hegrenade
5 weapon_xm1014
6 weapon_c4
7 weapon_mac10
8 weapon_aug
9 weapon_smokegrenade
10 weapon_elite
11 weapon_fiveseven
12 weapon_ump45
13 weapon_sg550
0
0
16 weapon_usp
17 weapon_glock18
18 weapon_awp
19 weapon_mp5navy
20 weapon_m249
21 weapon_m3
22 weapon_m4a1
23 weapon_tmp
24 weapon_g3sg1
25 weapon_flashbang
26 weapon_deagle
27 weapon_sg552
28 weapon_ak47
29 weapon_knife
30 weapon_p90 |
|