Raised This Month: $ Target: $400
 0% 

DoDs Equipment 0.0.6


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Lis
Member
Join Date: Jul 2008
Plugin ID:
469
Plugin Version:
0.0.6
Plugin Category:
Fun Stuff
Plugin Game:
Day of Defeat: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Modify DoDs equipment and ammo for each class
    Old 08-02-2008 , 12:28   Re: DoDs Equipment 0.0.6
    Reply With Quote #1

    Ah sorry DJ Tsunami i forgotten to write that down.

    I used the PrintToChatAll function. I read every value in a 4 byte step becouse the size of a single m_iAmmo cell is 4 byte.
    I used the valve developer community site to find out more about the hl2 memory structures.

    You simply paste this code on the top of the EquipClientCustom() function directly before the first if() statement.
    Code:
    for(new a = 0, tmpVal = 0; a < 100; a+=4) {
     tmpVal = GetEntData(client, ammo_offset + a, 4);
     PrintToChatAll("Offset %i contains %i", a, tmpVal);
    }
    Remember to get the ammo_offset of the m_iAmmo array with

    Code:
     
    new ammo_offset = FindSendPropOffs("CDODPlayer", "m_iAmmo");
    The last 3 chat messages (dont remember how many lines exactly) had shown random values. I think this is becouse the m_iAmmo array in dods only contains 22 cells.

    Anyway, i spawned with any class and wrote down the chat output. Then i compared the ammo i had ingame with the chatoutput values and connected the offsets.
    __________________

    Last edited by Lis; 08-02-2008 at 12:54.
    Lis is offline
    Send a message via ICQ to Lis Send a message via MSN to Lis
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 18:40.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode