下面是引用 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();
}
}
}