搜索
查看: 2111|回复: 3

谁有每句都给AWP的插件发一下

[复制链接]
发表于 2010-12-25 18:53:42 | 显示全部楼层 |阅读模式 来自 中国
谁有每句都给AWP的插件发一下
发表于 2011-8-16 14:41:09 | 显示全部楼层 来自 湖南
AWP。。。。。
回复

使用道具 举报

发表于 2011-8-17 17:36:19 | 显示全部楼层 来自 广东深圳

  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fakemeta>
  4. //#include <hamsandwich>

  5. public plugin_init()
  6. {
  7.         register_plugin("Give AWP", "1.0", "Jakyo")
  8. //        RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1)
  9.         register_event("ResetHUD", "player_spawn", "be")
  10. }

  11. public player_spawn(id)
  12. {
  13.         if ( !is_user_connected(id) ||  !is_user_alive(id))
  14.                 return PLUGIN_CONTINUE

  15.         fm_give_item(id, CSW_AWP)
  16.         fm_give_item(id, CSW_AWP)
  17.         fm_give_item(id, CSW_AWP)

  18.         return PLUGIN_CONTINUE

  19. }


  20. //public fw_PlayerSpawn_Post(id)
  21. //{
  22. //        if ( !is_user_connected(id))
  23. //                return HAM_IGNORED
  24. //
  25. //        fm_give_item(id, CSW_AWP)
  26. //
  27. //        return HAM_IGNORED
  28. //}

  29. // 给予玩家武器
  30. stock fm_give_item(id, weaponid)
  31. {
  32.         if (!is_user_alive(id)) return

  33.         new item[32]
  34.         get_weaponname(weaponid, item, sizeof item - 1)
  35.        
  36.         new ent
  37.         ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, item))
  38.         if (!pev_valid(ent)) return;
  39.        
  40.         new Float:originF[3]
  41.         pev(id, pev_origin, originF)
  42.         set_pev(ent, pev_origin, originF)
  43.         set_pev(ent, pev_spawnflags, pev(ent, pev_spawnflags) | SF_NORESPAWN)
  44.         dllfunc(DLLFunc_Spawn, ent)
  45.        
  46.         new save
  47.         save = pev(ent, pev_solid)
  48.         dllfunc(DLLFunc_Touch, ent, id)
  49.         if (pev(ent, pev_solid) != save)
  50.                 return;
  51.        
  52.         engfunc(EngFunc_RemoveEntity, ent)
  53. }
复制代码
回复

使用道具 举报

发表于 2011-8-17 17:38:02 | 显示全部楼层 来自 广东深圳
插件和代码

本帖子中包含更多资源

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

×
回复

使用道具 举报

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

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