PHP Code:
#include <amxmodx>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <fakemeta_util>
#include <fun>
#include <hamsandwich>
#include <xs>
#include <zombieplague>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
public plugin_init() {
register_clcmd("say test" , "test")
// Add your code here...
}
public test (id)
{
DropWeaponSlot ( id, 1);
}
stock DropWeaponSlot( iPlayer, iSlot )
{
new iWeaponEntity = GetWeaponFromSlot( iPlayer, iSlot );
if( iWeaponEntity > 0 )
{
new iWeaponID = get_pdata_cbase( iWeaponEntity, m_iId, 4 );
new szWeaponName[ 32 ];
get_weaponname( iWeaponID, szWeaponName, charsmax( szWeaponName ) );
engclient_cmd( iPlayer, "drop", szWeaponName );
}
}
stock GetWeaponFromSlot( iPlayer, iSlot )
{
return ( 1 <= iSlot <= 5 ) ? get_pdata_cbase( iPlayer, m_rpgPlayerItems_Slot0 + iSlot, 5 ) : -1;
}
This is a test plugin but it has some errors i want to know what cause this errors ?
Compiler:
(32)undefined symbol "m_iId"
(43)undefined symbol "m_rpgPlayerItems_Slot0"