Raised This Month: $ Target: $400
 0% 

WeaponList message and ammo


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
wiwi249
Member
Join Date: Oct 2013
Old 12-24-2014 , 16:39   WeaponList message and ammo
Reply With Quote #1

Hello there!
I've done a new plugin for my mod (a new weapon for CS), which you can see here:
https://www.youtube.com/watch?v=s7fyPTMZpys

The problem is with the ammo. I was following the tutorial here:
https://forums.alliedmods.net/showthread.php?t=175632
while making the plugin.

I'm sending
Code:
message_begin( MSG_ONE, MsgIndexWeaponList, .player = player ); 
        { 
            write_string( "weapon_sr25" );  // WeaponName 
            write_byte( 2 );                   // PrimaryAmmoID 
            write_byte( 20 );                   // PrimaryAmmoMaxAmount 
            write_byte( 2 );                   // SecondaryAmmoID 
            write_byte( 80 );                   // SecondaryAmmoMaxAmount 
            write_byte( 0 );                    // SlotID (0...N) 
            write_byte( 1 );                    // NumberInSlot (1...N) 
            write_byte( CSW_SG550 );            // WeaponID 
            write_byte( 0 );                    // Flags 
        } 
        message_end();
But had totally no idea what to do with the PrimaryAmmoID, PrimaryAmmoMaxAmount, SecondaryAmmoID, SecondaryAmmoMaxAmount.
As seen on the video, Bpammo is always 0, no matter how much primary ammo I buy. What's more - the weapon accually reloads when it can and if the ammo has been bought, but still the bpammo shows 0.
Anyone knows how to fix it? And could someone explain me those params:
PrimaryAmmoID, PrimaryAmmoMaxAmount, SecondaryAmmoID, SecondaryAmmoMaxAmount ?

Greets and Merry Christmas!
wiwi249 is offline
 



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 15:20.


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