Code:
new ent = create_entity("game_player_equip")
DispatchKeyValue( ent, "item_assaultsuit", "1" )
DispatchKeyValue( ent, "weapon_knife", "1" )
DispatchKeyValue( ent, "weapon_elite", "5" )
DispatchSpawn(ent);
It's all the same per ent = create_entity("game_player_equip") albeit variable or macro. Use the same perspective and confront yourself with. Here's how it looks.
Code:
#include amxmodx
#include engine
public plugin_precache()
DispatchKeyValue( create_entity("game_player_equip"), "item_assaultsuit", "1" ) &&
DispatchKeyValue( create_entity("game_player_equip"), "weapon_knife", "1" ) &&
DispatchKeyValue( create_entity("game_player_equip"), "weapon_elite", "5" ) &&
DispatchSpawn(create_entity("game_player_equip"));
Macro or not ent is still create_entity("game_player_equip")
Static instead of variable is what I would have chosen.
new const instead of variable is what I would have chosen.
Code:
#include amxmodx
#include engine
public plugin_precache()
{
new const ent = create_entity("game_player_equip")
DispatchKeyValue( ent, "item_assaultsuit", "1" )
DispatchKeyValue( ent, "weapon_knife", "1" )
DispatchKeyValue( ent, "weapon_elite", "5" )
DispatchSpawn(ent);
}
__________________