@Razoron: Since ANet Version 1.2.3.4 you can send structs with events, thanks to the "length/size" parameter that is passed. Take a look at the code I'm using for these spells to see how:

The player wants to cast a spell and sends it to the server:
Code:
// struct that contains spell info
typedef struct {
	unsigned short id;  // id of spell
	var ent_targ;   // globpointer of target
} s_sendspell;

s_sendspell d_send_spell; // global variable of the above struct that is automatically initialized, not a pointer.


void cl_send_spell(int spell_id, int spell_level, ENTITY* ent_targ)
{
	//TODO: check if the player is allowed to
	
	d_send_spell.id = spell_id;
	d_send_spell.ent_targ = enet_ent_globpointer(ent_targ);	
	
	enet_clsend_event(EVENT_SPELL, &d_send_spell, sizeof(s_sendspell), SERVER);
}



The server receives the spell and only sends the ID to the clients:

Code:
void sv_e_spell(var sender, STRING* data, var size)
{
	if (size != sizeof(s_sendspell)) {svdiag("\nERROR in sv_e_spell: received invalid data length"); return;}
	
	s_sendspell* sp_data = (s_sendspell*)data->chars; // get a new pointer with correct type, because the data is passed as a STRING*
	
// own code for handling spells, replace it with yours
// I included it to show cheating tests and how to send ok back to player
	ENTITY* ent_caster = enet_ent_locpointer(pl_globpointers[sender]);
	ENTITY* ent_targ = enet_ent_locpointer(sp_data->ent_targ);
	
	
	int sp_level = spellbook_get_level((s_spell_book*)ent_caster->spellbook, sp_data->id);
	if (sp_level == 0) {svdiag("\nCHEATING ATTEMPT in sv_e_spell: player doesn't have send spell"); return;}

	// do spell action
	if (sv_spell_act(ent_caster, sp_data->id, sp_level, ent_targ))
	{
		// send ok back to player, just the id, not the whole struct
		// will start cooldown timer at the player
		enet_svsend_event(EVENT_SPELL, sp_data->id, sizeof(unsigned short), sender);
		
		// TODO: send effect to all players nearby.
	}
}



I've used the type "unsigned short" to save 2 bytes of transferred data. Thats not really necessary for smaller games, but I want to save traffic wherever possible. I'm also not sending the caster, it is implied that the player entity of the sender is always the caster.