[TUT]NO-Drop for V3 Source

Results 1 to 8 of 8
  1. #1
    Member Fraude is offline
    MemberRank
    Sep 2015 Join Date
    TurkeyLocation
    63Posts

    [TUT]NO-Drop for V3 Source

    Fuctions > WZ_Char_SRV_SetStatus ;

    -- record last game update
    update UsersData set GameDollars=@in_GameDollars, lastgamedate=GETDATE() where CustomerID=@in_CustomerID


    -- update basic character data
    update UsersChars set
    GamePos=@in_GamePos,
    GameFlags=@in_GameFlags,
    Alive=@in_Alive,
    Health=@in_Health,
    Food=@in_Hunger,
    Water=@in_Thirst,
    Toxic=@in_Toxic,
    TimePlayed=@in_TimePlayed,
    LastUpdateDate=GETDATE(),
    XP=@in_XP,
    Reputation=@in_Reputation,
    Stat00=@in_Stat00,
    Stat01=@in_Stat01,
    Stat02=@in_Stat02,
    Stat03=@in_Stat03,
    Stat04=@in_Stat04,
    Stat05=@in_Stat05
    where CharID=@in_CharID


    -- update resources
    update UsersData set ResWood=@in_ResWood, ResStone=@in_ResStone, ResMetal=@in_ResMetal where CustomerID=@in_CustomerID


    if(@in_Alive = 0) begin
    update UsersChars set DeathUtcTime=GETUTCDATE() where CharID=@in_CharID
    -- set default backpack on death
    update UsersChars set BackpackID=20176, BackpackSize=12 where CharID=@in_CharID
    -- delete stuff from backpack
    delete from UsersInventory where CustomerID=@in_CustomerID and CharID=@in_CharID
    end


    Change to ;


    -- this function should be called only by server, so we skip all validations
    --

    /* -- record last game update
    update UsersData set GameDollars=@in_GameDollars, lastgamedate=GETDATE() where CustomerID=@in_CustomerID

    -- update basic character data
    update UsersChars set
    GamePos=@in_GamePos,
    GameFlags=@in_GameFlags,
    Alive=@in_Alive,
    Health=@in_Health,
    Food=@in_Hunger,
    Water=@in_Thirst,
    Toxic=@in_Toxic,
    TimePlayed=@in_TimePlayed,
    LastUpdateDate=GETDATE(),
    XP=@in_XP,
    Reputation=@in_Reputation,
    Stat00=@in_Stat00,
    Stat01=@in_Stat01,
    Stat02=@in_Stat02,
    Stat03=@in_Stat03,
    Stat04=@in_Stat04,
    Stat05=@in_Stat05
    where CharID=@in_CharID

    -- update resources
    update UsersData set ResWood=@in_ResWood, ResStone=@in_ResStone, ResMetal=@in_ResMetal where CustomerID=@in_CustomerID*/

    --if(@in_Alive = 0) begin
    -- update UsersChars set DeathUtcTime=GETUTCDATE() where CharID=@in_CharID
    -- set default backpack on death
    update UsersChars set BackpackID=20176, BackpackSize=12 where CharID=@in_CharID
    -- delete stuff from backpack
    -- delete from UsersInventory where CustomerID=@in_CustomerID and CharID=@in_CharID
    -- end

    Search to WarZ_Server.sln ;

    // drop all items
    Find ;
    // drop all items
    for(int i=0; i < loadout_->BackpackSize; i++)
    {
    const wiInventoryItem& wi = loadout_->Items[i];
    if(wi.itemID > 0)
    {
    if(isSwimming || (isOverWater && waterDepth > allowedDepth))
    BackpackRemoveItem(wi);
    else
    BackpackDropItem(i);
    }
    }
    Change to ;

    /*// drop all items
    for(int i=0; i < loadout_->BackpackSize; i++)
    {
    const wiInventoryItem& wi = loadout_->Items[i];
    if(wi.itemID > 0)
    {
    if(isSwimming || (isOverWater && waterDepth > allowedDepth))
    BackpackRemoveItem(wi);
    else
    BackpackDropItem(i);
    }
    }*/

    Search WarZ_Server ;

    DROPPED_ITEM_EXPIRE_TIME
    const float DROPPED_ITEM_EXPIRE_TIME = 15 * 60.0f; // 60 min
    Change to ;

    const float DROPPED_ITEM_EXPIRE_TIME = 0 * 1.0f; // 60 min
    NOT TESTİNG!


  2. #2
    Member arnoza085 is offline
    MemberRank
    Dec 2014 Join Date
    Thailand <3Location
    57Posts

    Re: [TUT]NO-Drop for V3 Source

    Ok all server is nodrop now!!! Hurayyy :/

  3. #3
    Account Upgraded | Title Enabled! Returnerzx is offline
    MemberRank
    Apr 2011 Join Date
    236Posts

    Re: [TUT]NO-Drop for V3 Source

    how to make only for map nodrop ?

    ex. WZ_Colorado_NoDrop is use no drop and WZ_Colorado is drop item ?

    item want to use nodrop for 1 map :(

  4. #4
    Member Fraude is offline
    MemberRank
    Sep 2015 Join Date
    TurkeyLocation
    63Posts

    Re: [TUT]NO-Drop for V3 Source

    WarZ_Server.sln search to ;

    int CJobUpdateChar::Exec()
    Find ;
    bool updateCharEnable=true;
    Add Below ;

    if(gServerLogic.ginfo_.mapId==GBGameInfo::MAPID_WZ_MAPNAME)
    updateCharEnable=false;

  5. #5
    Account Upgraded | Title Enabled! Returnerzx is offline
    MemberRank
    Apr 2011 Join Date
    236Posts

    Re: [TUT]NO-Drop for V3 Source

    Thank you :)

  6. #6
    Yuri-BR#1559 Yuri-BR is offline
    DeveloperRank
    Apr 2013 Join Date
    ☣️❤️Location
    1,040Posts

    Re: [TUT]NO-Drop for V3 Source

    Quote Originally Posted by Returnerzx View Post
    how to make only for map nodrop ?

    ex. WZ_Colorado_NoDrop is use no drop and WZ_Colorado is drop item ?

    item want to use nodrop for 1 map :(
    lol, you can use this tutorial I created a few months ago.

    http://forum.ragezone.com/f791/tutor...t-drop-989857/

    I will update the tropic with the fix for the src I:SS TH

  7. #7
    Account Upgraded | Title Enabled! Returnerzx is offline
    MemberRank
    Apr 2011 Join Date
    236Posts

    Re: [TUT]NO-Drop for V3 Source

    Ho Yuri-BR Thank you :)

  8. #8
    Account Upgraded | Title Enabled! Adnan DatLife is offline
    MemberRank
    Aug 2015 Join Date
    main.cppLocation
    207Posts

    Re: [TUT]NO-Drop for V3 Source

    This tut allready shared. Remove PLS!



Advertisement