I've tried to create a sprite above the head for the members of a group, but i get the following error, Argument type mismatch (argument 1)
What did i do wrong?
Code:
#define iSprite "sprites/adn_sprites/adn_fireball_ex.spr"
public plugin_precache()
{
precache_model(iSprite)
}
public cmdspr(id)
{
new Players[32], user
get_party_index(id, Players)
for(new i; i < g_PartyData[id][Amount_In_Party]; i++)
{
user = Players[i]
if(is_user_alive(user) && !zp_get_user_zombie(user))
{
Create_TE_PLAYERATTACHMENT(id, user)
}
}
}
stock Create_TE_PLAYERATTACHMENT(id, entity)
{
message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, _, id)
write_byte(TE_PLAYERATTACHMENT)
write_byte(entity)
write_coord(45)
write_short(iSprite)
write_short(0)
message_end()
}