AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED] Drop primary | secondary (https://forums.alliedmods.net/showthread.php?t=126179)

5c0r-|3i0 05-06-2010 10:48

[SOLVED] Drop primary | secondary
 
I need 2 stocks...
1) primary
2) secondary...
thanks in advance...

Exolent[jNr] 05-06-2010 19:25

Re: [Stock] Drop primary | secondary
 
Code:
#include < amxmodx > #include < fakemeta > #include < hamsandwich > DropWeaponSlot( iPlayer, iSlot ) {     static const m_rpgPlayerItems = 367; // player     static const m_pNext = 42; // weapon_*     static const m_iId = 43; // weapon_*         if( !( 1 <= iSlot <= 2 ) )     {         return 0;     }         new iCount;         new iEntity = get_pdata_cbase( iPlayer, ( m_rpgPlayerItems + iSlot ), 5 );     if( iEntity > 0 )     {         new iNext;         new szWeaponName[ 32 ];                 do         {             iNext = get_pdata_cbase( iEntity, m_pNext, 4 );                         if( get_weaponname( get_pdata_int( iEntity, m_iId, 4 ), szWeaponName, charsmax( szWeaponName ) ) )             {                 engclient_cmd( iPlayer, "drop", szWeaponName );                                 iCount++;             }         }         while( ( iEntity = iNext ) > 0 );     }         return iCount; }

5c0r-|3i0 05-06-2010 19:57

Re: [Stock] Drop primary | secondary
 
Thanks....Solved :D


All times are GMT -4. The time now is 03:45.

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