how to add auto item to new player?
and 2nd
How to add auto item after player die!!
i has
exec FN_AddItemToUser @CustomerID, 20174, 2000 >> but for account
- - - Updated - - -
how to add auto item to new player?
-- Modify WZ_CharCreate
-- find -- give basic items for first few survivors
-- edit
- - - Updated - - -
Code:
if @CharsCreated <= 5) begin
-- add some default items - BE ULTRA CAREFUL with BackpackSlot number
insert into UsersInventory (CustomerID, CharID, BackpackSlot, ItemID, LeasedUntil, Quantity)
values (@in_CustomerID, @CharID, 1, 101306, '2020-1-1', 1) -- Flashlight
insert into UsersInventory (CustomerID, CharID, BackpackSlot, ItemID, LeasedUntil, Quantity)
values (@in_CustomerID, @CharID, 2, 101261, '2020-1-1', 1) -- Bandages
insert into UsersInventory (CustomerID, CharID, BackpackSlot, ItemID, LeasedUntil, Quantity)
values (@in_CustomerID, @CharID, 3, 101296, '2020-1-1', 1) -- Can of Soda
insert into UsersInventory (CustomerID, CharID, BackpackSlot, ItemID, LeasedUntil, Quantity)
values (@in_CustomerID, @CharID, 4, 101289, '2020-1-1', 1) -- Granola Bar
end
Re: how to add auto item to new player?
i found >> WZ_Char_SRV_SetStatus
Code:
if(@in_Alive = 0) begin
update UsersChars set DeathUtcTime=GETUTCDATE() where CharID=@in_CharID
if(@IsLegend >= 1) begin -- vip no drop
-- set default backpack on death
update UsersChars set BackpackID=20175, BackpackSize=18 where CharID=@in_CharID
update UsersChars set BackpackID=20176, BackpackSize=12 where CharID=@in_CharID
update UsersChars set BackpackID=20179, BackpackSize=24 where CharID=@in_CharID
update UsersChars set BackpackID=20180, BackpackSize=32 where CharID=@in_CharID
update UsersChars set BackpackID=20181, BackpackSize=12 where CharID=@in_CharID
update UsersChars set BackpackID=20185, BackpackSize=28 where CharID=@in_CharID
update UsersChars set BackpackID=20196, BackpackSize=50 where CharID=@in_CharID
update UsersChars set BackpackID=20200, BackpackSize=28 where CharID=@in_CharID
-- delete stuff from backpack
delete from UsersInventory where CustomerID=@in_CustomerID and CharID=@in_CharID
end
end