请教一个获取武器问题
本帖最后由 心静如水 于 2009-3-9 22:45 编辑weapon = get_user_weapon(attacker,dummy,dummy)
...if(is_user_alive(attacker)&&(weapon==CSW_AWP)...............
使用中日记提示get_user_weapon(attacker,dummy,dummy)会是错的呢?
如何改正法? AMXX版本是多少,具体出错日志是什么样的?不要发这些断章取义的问题来 AMXX版本是多少,具体出错日志是什么样的?不要发这些断章取义的问题来
zwfgdlc 发表于 2009-3-9 23:23 http://www.dt-club.net/forum/images/common/back.gif
对不住了
CS1.6 1.76C ............日记如下:
L 03/10/2009 - 00:00:48: Invalid player id 0
L 03/10/2009 - 00:00:48: Run time error 10 (plugin "fffwww.amxx") (native "get_user_weapon") - debug not enabled!
L 03/10/2009 - 00:00:48: To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 03/10/2009 - 00:01:19: Player out of range (0) Invalid player id =无效的玩家id
应该这样.
if(is_user_alive(attacker) && get_user_weapon(attacker,clip, ammo )==CSW_AWP)})
{
}
本帖最后由 心静如水 于 2009-3-10 17:14 编辑
谢谢老师,
有时间再帮看这个一次先,
刀战局设每人的重力这样,也会出现那个错误.....
get_players(players,num)
for(new i = 0; i <= num; ++i){
if( is_user_alive(players)){
set_user_gravity( players, 0.2);
L 03/10/2009 - 00:01:19: Player out of range (0)
L 03/10/2009 - 00:01:19: Run time error 10 (plugin "xxxx.amxx") (native "set_user_gravity") - debug not enabled!
L 03/10/2009 - 00:01:19: To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
怎么办才好 players i <= num->i < num 本帖最后由 Rulzy 于 2009-3-10 18:25 编辑
get_players(players,num)
for(new i = 0; i < num; ++i){
if( is_user_alive(players)){
set_user_gravity( players, 0.2); Rulzy版主现在这么有空:lol.
建议改进下成这样get_players(players,num)
for(new i = 0; i < num; ++i){
id=players;
if( is_user_alive(id)){
set_user_gravity(id, 0.2);
很感谢各位版主......
new maxppl = get_maxplayers()
for(new i = 1; i <= maxppl; ++i){
这个为什么能用"="号呢?......如果忙不得空解释也罢..........^_^.........
页:
[1]
2