Raised This Month: $ Target: $400
 0% 

set weaponanim by entity


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Gian_Yagami
Member
Join Date: Apr 2014
Old 01-27-2016 , 01:44   set weaponanim by entity
Reply With Quote #1

I'm trying to show holster animation but the animation Doesn't play

Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "Weapon"
#define VERSION "1.0"
#define AUTHOR "Gian Yagami"


new weapon [][] =
{
    "weapon_357",
    "weapon_9mmAR",
    "weapon_9mmhandgun",
    "weapom_crossbow",
    "weapon_crowbar",
    "weapon_egon",
    "weapon_gauss",
    "weapon_handgrenade",
    "weapon_hornetgun",
    "weapon_rpg",
    "weapon_satchel",
    "weapon_shotgun",
    "weapon_snark",
    "weapon_tripmine"
}


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    for(new i = 0; i < sizeof weapon; i++)
    {
        RegisterHam(Ham_Item_Holster, weapon[i], "holster")
    }
}

public holster(ent)
{
    //message_begin(MSG_ONE, SVC_WEAPONANIM, _, ent)
    //write_byte(8) //Animation id
    //write_byte(pev(ent,pev_body))
    //message_end()
    
    //new playerid = get_pdata_cbase(ent, 41, 4)
    new id = pev(ent, pev_owner)
    set_pev(id, pev_weaponanim, 8)    
}
Using message_begin and get_pdata_cbase will make game crash.
Gian_Yagami 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 09:32.


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