Raised This Month: $ Target: $400
 0% 

[help] te_playerattachment


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-20-2015 , 05:06   [help] te_playerattachment
Reply With Quote #1

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()
}
Depresie is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode