@@ -18,7 +18,7 @@ private void CmdGen(CCSPlayerController? player, CommandInfo info)
1818 return ;
1919 }
2020
21- var gencode = info . ArgString . Trim ( ) ;
21+ var gencode = info . ArgString . Contains ( "//" ) ? info . ArgString . Trim ( ) : info . ArgByIndex ( 1 ) ;
2222 var userId = player . UserId ;
2323 var steamId = player . SteamID ;
2424
@@ -90,14 +90,14 @@ private async Task FetchAndGiveAsync(string gencode, int? userId, ulong steamId)
9090 CultureInfo . InvariantCulture , out var apiWear ) ;
9191
9292 GiveItem ( apiDefIndex , apiPaintKit , apiSeed , apiWear ,
93- new [ ]
93+ DeduplicateStickerSlots ( new [ ]
9494 {
9595 new StickerSlot ( detail . Sticker1Slot , detail . Sticker1Id , detail . Sticker1Value , detail . Sticker1X , detail . Sticker1Y , detail . Sticker1R ) ,
9696 new StickerSlot ( detail . Sticker2Slot , detail . Sticker2Id , detail . Sticker2Value , detail . Sticker2X , detail . Sticker2Y , detail . Sticker2R ) ,
9797 new StickerSlot ( detail . Sticker3Slot , detail . Sticker3Id , detail . Sticker3Value , detail . Sticker3X , detail . Sticker3Y , detail . Sticker3R ) ,
9898 new StickerSlot ( detail . Sticker4Slot , detail . Sticker4Id , detail . Sticker4Value , detail . Sticker4X , detail . Sticker4Y , detail . Sticker4R ) ,
9999 new StickerSlot ( detail . Sticker5Slot , detail . Sticker5Id , detail . Sticker5Value , detail . Sticker5X , detail . Sticker5Y , detail . Sticker5R ) ,
100- } . Where ( s => s . Id != 0 ) . ToArray ( ) ,
100+ } . Where ( s => s . Id != 0 ) . ToArray ( ) ) ,
101101 detail . KeyChainId , detail . KeyChainPattern , detail . KeyChainX , detail . KeyChainY , detail . KeyChainZ ,
102102 detail . StatTrakEnabled == "1" , detail . StatTrakValue , detail . NameTag ,
103103 userId , steamId ) ;
0 commit comments