Code:
#include <amxmodx>
#include <engine>
public plugin_precache()
{
new Entity;
Entity = create_entity( "info_map_parameters" );
DispatchKeyValue( Entity, "buying", "3" );
DispatchSpawn( Entity );
Entity = create_entity( "player_weaponstrip" );
DispatchKeyValue( Entity, "targetname", "stripper" );
DispatchSpawn( Entity );
Entity = create_entity( "game_player_equip" );
DispatchKeyValue( Entity, "weapon_knife" , "1" );
DispatchKeyValue( Entity, "weapon_glock18", "1" );
DispatchKeyValue( Entity, "ammo_9mm" , "3" );
DispatchKeyValue( Entity, "targetname" , "equipment" );
DispatchSpawn( Entity );
Entity = create_entity( "multi_manager" );
DispatchKeyValue( Entity, "equipment" , "0.5" );
DispatchKeyValue( Entity, "stripper" , "0" );
DispatchKeyValue( Entity, "targetname", "game_playerspawn" );
DispatchKeyValue( Entity, "spawnflags", "1" );
DispatchSpawn( Entity );
}
public pfn_keyvalue( Entity )
{
new ClassName[ 20 ];
new KeyName [ 16 ];
new Value [ 20 ];
copy_keyvalue( ClassName, charsmax( ClassName ), KeyName, charsmax( KeyName ), Value, charsmax( Value ) )
if ( equal( ClassName, "info_map_parameters" ) || equal( ClassName, "player_weaponstrip" ) ||
equal( ClassName, "game_player_equip" ) || equal( ClassName, "func_buyzone" ) )
{
remove_entity( Entity );
return PLUGIN_HANDLED;
}
else if ( equal( ClassName, "multi_manager" ) && equal( KeyName, "targetname" ) && equal( Value, "game_playerspawn" ) )
{
remove_entity( Entity );
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
public plugin_init()
{
register_plugin( "Give Glock", "1.0.0", "Arkshine" );
}