下面是引用 freeze02468 于 2013-12-21 14:25 发表的 :
真的很不好意思大大...
请问一下我这样子改对吗?
SPR 有成功换成闪灵的了!
不过...连 M3 的SPR也换成闪灵的了...
那有办法将M3 和闪灵的SPR分开吗?
抱歉小弟不懂这些...好复杂...
只要是新增武器的插件铁定都会有个变数是用来纪录玩家是否拥有新武器…
例如这插件是用 has_hellm3[id] 这个…
复制程式
public OnAddToPlayerKnife( const item, const player )
{
if( pev_valid( item ) && is_user_alive( player ) ) // just for safety.
{
if( has_hellm3[ player ] ) // 有捡到新武器
{
message_begin( MSG_ONE, MsgIndexWeaponList, .player = player );
write_string( "weapon_m1887" ); // WeaponName
write_byte( 5 ); // PrimaryAmmoID
write_byte( 32 ); // PrimaryAmmoMaxAmount
write_byte( -1 ); // SecondaryAmmoID
write_byte( -1 ); // SecondaryAmmoMaxAmount
write_byte( 0 ); // SlotID (0...N)
write_byte( 5 ); // NumberInSlot (1...N)
write_byte( CSW_M3 ); // WeaponID
write_byte( 0 ); // Flags
message_end();
}
else // 没捡到新武器,只是普通的武器
{
message_begin( MSG_ONE, MsgIndexWeaponList, .player = player );
write_string( "weapon_m3" ); // WeaponName
write_byte( 5 ); // PrimaryAmmoID
write_byte( 32 ); // PrimaryAmmoMaxAmount
write_byte( -1 ); // SecondaryAmmoID
write_byte( -1 ); // SecondaryAmmoMaxAmount
write_byte( 0 ); // SlotID (0...N)
write_byte( 5 ); // NumberInSlot (1...N)
write_byte( CSW_M3 ); // WeaponID
write_byte( 0 ); // Flags
message_end();
}
}
}