廣告廣告
  加入我的最愛 設為首頁 風格修改
首頁 首尾
 手機版   訂閱   地圖  簡體 
您是第 1666 個閱讀者
 
發表文章 發表投票 回覆文章
  可列印版   加為IE收藏   收藏主題   上一主題 | 下一主題   
waipun
個人文章 個人相簿 個人日記 個人地圖
小人物
級別: 小人物 該用戶目前不上站
推文 x5 鮮花 x10
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片
推文 x0
[1.6][插件] sma問題(設定檔 & 模組)  (對不起 又是我了 [s:488])
如題
請問怎加sma弄設定檔?
和怎弄sma戴入模組?

謝謝大大

回一
那是人物mdl吧
我想戴入槍模
我有個sma
看不懂

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <xs>
#include <gunxpmod>
#include <engine>
#include <cstrike>
new PLUGIN_NAME[]  = "UNLOCK : AK06"
new PLUGIN_AUTHOR[]  = "xbatista"
new PLUGIN_VERSION[]  = "1.0"
new const WEAPON_V_MDL[] = "models/gunxpmod/v_ak472.mdl";
#define WEAPON_CSW CSW_AK47
new const weapon_n[] = "weapon_ak47";
const m_pPlayer = 41;
const m_flPrimaryAttack = 46;
#define IsPlayer(%1)  ( 1 <= %1 <= g_maxplayers )
new g_hasZoom[33];
new damage_weapon, pCvarRof, weapon_recoil;
new g_maxplayers; 
new bool:g_Weapon[33];
new Float:cl_pushangle[33][3];
new szClip, szAmmo;
public plugin_init()
{
 register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
 register_gxm_item("加強版AK47", "+準確度 +射速 +威力 +瞄準器 (只限使用 AK47 時)", 20)
 damage_weapon = register_cvar("gxm_damage_ak","1.5"); // damage multiplier
 pCvarRof = register_cvar( "ak_rof", "0.090" ); // weapon rof
 weapon_recoil = register_cvar( "ak_recoil", "0.8" ); // weapon recoil
 register_event("CurWeapon", "Event_CurWeapon", "be", "1=1");
 
 RegisterHam( Ham_Weapon_PrimaryAttack, weapon_n, "Fwd_AttackSpeedPost" , 1 );
 RegisterHam(Ham_Weapon_PrimaryAttack, weapon_n, "Fwd_AttackSpeedPre");
        RegisterHam( Ham_Item_Deploy , weapon_n, "Fwd_AttackSpeedPost", 1 );
 RegisterHam(Ham_TakeDamage, "player", "Ham_DamageWeapon");
 register_forward( FM_CmdStart, "Fwd_CmdStart" );
 g_maxplayers = get_maxplayers();
}
public gxm_item_enabled(id)
{
 g_Weapon[id] = true;
}
public client_connect(id)
{
 g_Weapon[id] = false;
}
public plugin_precache() 
{
 engfunc(EngFunc_PrecacheModel, WEAPON_V_MDL);
}
public Fwd_AttackSpeedPre(Ent)
{
 new id = pev(Ent,pev_owner);
 entity_get_vector( id, EV_VEC_punchangle, cl_pushangle[id]);
}
public Fwd_AttackSpeedPost( const Entity )
{
 static id ; id = get_pdata_cbase(Entity, m_pPlayer, 4)
 if (g_Weapon[id] && IsPlayer(id) )
 {
  set_pdata_float( Entity, m_flPrimaryAttack, get_pcvar_float( pCvarRof ), 4 );
  new Float:push[3];
  entity_get_vector( id, EV_VEC_punchangle, cl_pushangle[id]);
  xs_vec_sub( push, cl_pushangle[id], push);
  xs_vec_mul_scalar( push, get_pcvar_float( weapon_recoil ), push);
  xs_vec_add( push, cl_pushangle[id], push);
  entity_set_vector( id, EV_VEC_punchangle, push);
 }
}
public Ham_DamageWeapon(id, inflictor, attacker, Float:damage, damagebits)
{
 if ( !IsPlayer(attacker) || !g_Weapon[attacker] )
         return HAM_IGNORED;
 new weapon2 = get_user_weapon(attacker, _, _);
 if( weapon2 == WEAPON_CSW)
 {
  SetHamParamFloat(4, damage * get_pcvar_float(damage_weapon));
  return HAM_HANDLED;
 }
 return HAM_IGNORED;
}
public Event_CurWeapon(id)
{
 if ( !g_Weapon[id] || !is_user_alive(id) )
 return PLUGIN_CONTINUE;
 new Gun = read_data(2)
 if( Gun == WEAPON_CSW)
 {
  entity_set_string(id, EV_SZ_viewmodel, WEAPON_V_MDL)
 }
 return PLUGIN_CONTINUE;
}
public Fwd_CmdStart( id, uc_handle, seed )
{
 if( !is_user_alive( id ) || !g_Weapon[id] )
  return FMRES_IGNORED;
 if( ( get_uc( uc_handle, UC_Buttons ) & IN_ATTACK2 ) && !( pev( id, pev_oldbuttons ) & IN_ATTACK2 ) )
 {
  new szWeapID = get_user_weapon( id, szClip, szAmmo )
  if( szWeapID == WEAPON_CSW && !g_hasZoom[ id ])
  {
   g_hasZoom[ id ] = true
   cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 1 )
  }
  else
  { if( g_hasZoom[ id ] )
   {
    g_hasZoom[ id ] = false
    cs_set_user_zoom( id,  CS_RESET_ZOOM, 0 )
   }
  }
  return FMRES_HANDLED;
 }
 return FMRES_IGNORED;
}


[ 此文章被waipun在2011-01-12 14:31重新編輯 ]



怎寫amxx
獻花 x0 回到頂端 [樓 主] From:沒有資料 | Posted:2011-01-08 18:55 |
i-c0112
個人頭像
個人文章 個人相簿 個人日記 個人地圖
小有名氣
級別: 小有名氣 該用戶目前不上站
推文 x6 鮮花 x194
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

請問怎加sma弄設定檔?
你是指ini檔??看看 file.inc吧

precache_model("name.mdl")

建議你去參考別人的sma就比較清楚用法了→"ZP" 不錯的選擇


獻花 x0 回到頂端 [1 樓] From:台灣中華電信 | Posted:2011-01-08 19:12 |

首頁  發表文章 發表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.021149 second(s),query:16 Gzip disabled
本站由 瀛睿律師事務所 擔任常年法律顧問 | 免責聲明 | 本網站已依台灣網站內容分級規定處理 | 連絡我們 | 訪客留言