搜索
查看: 2125|回复: 6

谁能给我看一看问题出在那里,为什么这个原码我编释不上!

[复制链接]
发表于 2004-12-18 20:19:00 | 显示全部楼层 |阅读模式 来自 中国–黑龙江–齐齐哈尔
// written by thomas aka -]ToC[-blah blah blah
// admin commands:
//   amx_girlthrow <authid, nick or #userid> [time]
//   amx_ungirlthrow <authid, nick or #userid>
// cvars:
//   amx_girlthrow 0 or 1 - makes all players throw like a girl

#include <amxmod>
#include <amxmisc>
#include <xtrafun>

new const HEGRENADE_MODEL[] = "models/w_hegrenade.mdl"
new girlthrow[33]

public grenid(parm[]){
    new id = parm[0]
    new string[32], grenadeid = 0
    do
    {
        grenadeid = get_grenade_id(id, string, 31, grenadeid)
    }
    while (grenadeid &&!equali(HEGRENADE_MODEL,string));

    if (grenadeid)
    {
        new grenage_vel[3]
        grenage_vel[0] = 0
        grenage_vel[1] = 0
        grenage_vel[2] = 0
        set_entity_velocity(grenadeid, grenage_vel)
    }

}

public TextMsg(id){
    new cvar = get_cvar_num("amx_girlthrow")
    if (!girlthrow[id] && !cvar) return PLUGIN_CONTINUE
     
    new name[32]
    read_data(3, name, 31)
    if (id==find_player("a",name))
    {
        new parm[1]
        parm[0] = id
        set_task(0.001,"grenid",50,parm,1)
    }
     
    return PLUGIN_CONTINUE
}

public amx_girlthrow(id,level,cid) {
    if (!cmd_access(id,level,cid,3))
        return PLUGIN_HANDLED

    new arg[32]
    read_argv(1,arg,31)
    new player = cmd_target(id,arg,1)
    if (!player) return PLUGIN_HANDLED
     
    girlthrow[player] = 1
     
    new sthrowtime[8]
    read_argv(2,sthrowtime,7)
    new Float:throwtime = floatstr(sthrowtime)
     
    new param[2]
    param[0] = player
    new name[32]
    get_user_name(player, name , 31)
    set_task( throwtime ? throwtime : 99999.0 ,"ungirlthrow",player,param,1)
    set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
    show_hudmessage(0,"%s throws like a girl!",name)
    return PLUGIN_HANDLED
}


public ungirlthrow(param[]) {
    new id = param[0]
    if (!girlthrow[id]) return PLUGIN_HANDLED
    girlthrow[id] = 0
    new name[32]
    get_user_name(id, name , 31)
    set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
    show_hudmessage(0,"%s no longer throws like a girl.",name)
    return PLUGIN_HANDLED
}

public amx_ungirlthrow(id,level,cid) {
    if (!cmd_access(id,level,cid,2))
        return PLUGIN_HANDLED
    new arg[32]
    read_argv(1,arg,31)
    new player = cmd_target(id,arg,1)
    if (!player) return PLUGIN_HANDLED
    new param[2]
    param[0] = player
    ungirlthrow(param)
    return PLUGIN_HANDLED
}

public client_disconnect(id) {
    new param[2]
    param[0] = id
    ungirlthrow(param)
    return PLUGIN_CONTINUE
}

public plugin_init()
{
    register_plugin("Throw Like a Girl","0.1","blah")
    register_cvar("amx_girlthrow","0")
    register_concmd("amx_girlthrow","amx_girlthrow",ADMIN_LEVEL_A,"<authid, nick or #userid> [time]")
    register_concmd("amx_ungirlthrow","amx_ungirlthrow",ADMIN_LEVEL_A,"<authid, nick or #userid>")
    register_event("TextMsg","TextMsg","b","2&#Game_radio", "4&#Fire_in_the_hole")
    return PLUGIN_CONTINUE
}
发表于 2004-12-18 23:02:10 | 显示全部楼层 来自 中国–河南–安阳
你自己写的源码? 还是让牛牛来帮你
如果是下载的 什么版本的源码 amx amxx?
回复

使用道具 举报

发表于 2004-12-18 23:48:59 | 显示全部楼层 来自 中国–山东–临沂
编译能通过...
回复

使用道具 举报

 楼主| 发表于 2004-12-19 15:35:48 | 显示全部楼层 来自 中国–黑龙江–齐齐哈尔
那为什么我编译时出现
amx_girl.sma<9> : fatal error 100 : cannot read from file :"amxmod"
Compilation aborted.
1 Error.

你编译通过了,能不能在AMX里运行起来呀,这个要运行 xtrafun 插件,如果你编译 amx list 里看到运行了,能发上来吗!
回复

使用道具 举报

发表于 2004-12-19 15:42:00 | 显示全部楼层 来自 中国–广东–广州–越秀区
1.0下编译通过

这个东东有什么用的??

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
回复

使用道具 举报

 楼主| 发表于 2004-12-20 00:36:03 | 显示全部楼层 来自 中国–黑龙江–齐齐哈尔
我想要是的 AMX 里运行的,这个是把某人变成girl
回复

使用道具 举报

发表于 2004-12-20 00:39:29 | 显示全部楼层 来自 中国–山东–临沂
Post by 小迷糊
那为什么我编译时出现
amx_girl.sma<9> : fatal error 100 : cannot read from file :"amxmod"
Compilation aborted.
1 Error.

你编译通过了,能不能在AMX里运行起来呀,这个要运行 xtrafun 插件,如果你编译 amx list 里看到运行了,能发上来吗!


是不是头文件丢了, 重新下个编译器和头文件, 覆盖一下
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表