Raised This Month: $ Target: $400
 0% 

[CSGO] Show Team Equipment And Money


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 04-05-2018 , 17:23   Re: Can anyone make it
Reply With Quote #1

Raizo but how we can change their position coz if we write a string we get the position of status icon , But in Images they appears to get their origin over players Head .. How is that possible :/ ?
instinctpt1 is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 04-06-2018 , 02:23   Re: Can anyone make it
Reply With Quote #2

Quote:
Originally Posted by instinctpt1 View Post
Raizo but how we can change their position coz if we write a string we get the position of status icon , But in Images they appears to get their origin over players Head .. How is that possible :/ ?
Exist many ways to do it

A little example :

Code:
#include <amxmodx>

new ak47_id, m4a1_id;

public plugin_init()
{
    register_event( "CurWeapon", "sprite_model", "be", "1=1" );
}

public sprite_model(id)
{
    if(is_user_alive(id) )
    {
        if(get_user_weapon(id) == CSW_AK47) 
        {
            remove_sprite(id)
            ak47_sprite(id)
        }
        else if(get_user_weapon(id) == CSW_M4A1) 
        {  
            remove_sprite(id)
            m4a1_sprite(id)
        }
    }
}

public plugin_precache()
{
    ak47_id = precache_model( "sprites/ak47.spr" );
    m4a1_id = precache_model( "sprites/m4a1.spr" );
}


stock ak47_sprite( index )
{
    if ( !is_user_connected( index ) )
    {
        return;
    }

    message_begin( MSG_ALL, SVC_TEMPENTITY );
    write_byte( TE_PLAYERATTACHMENT );
    write_byte( index );
    write_coord( 60 );
    write_short( ak47_id );
    write_short( 9000 );
    message_end();
}

stock m4a1_sprite( index )
{
    if ( !is_user_connected( index ) )
    {
        return;
    }

    message_begin( MSG_ALL, SVC_TEMPENTITY );
    write_byte( TE_PLAYERATTACHMENT );
    write_byte( index );
    write_coord( 60 );
    write_short( m4a1_id );
    write_short( 9000 );
    message_end();
}

stock remove_sprite( index )
{
    if ( !is_user_connected( index ) )
    {
        return;
    }

    message_begin( MSG_ALL, SVC_TEMPENTITY );
    write_byte( TE_KILLPLAYERATTACHMENTS );
    write_byte( index );
    message_end();
}

Last edited by raizo11; 04-06-2018 at 04:04.
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
Reply



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 09:52.


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