Raised This Month: $ Target: $400
 0% 

Anyone have the answer to this


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Mugwump
Senior Member
Join Date: May 2004
Old 08-31-2004 , 22:31   Anyone have the answer to this
Reply With Quote #1

I am trying to attach a model to a player, I have the model in both the valve/models directory and cstrike/models called roots2.mdl

Here is the source:

Code:
#include <amxmodx> #include <amxmisc> #define TE_PLAYERATTACHMENT 124 new roots public plugin_init() {    register_plugin("Roots Test", "1.0", "K2mia")    set_task(1.0, "test_sprite", 457) } public plugin_precache(){    roots = precache_model("models/roots2.mdl") } public test_sprite() {    new players[32], numofplayers, id, i    new origin[3]    get_players(players, numofplayers)    for (i = 0; i < numofplayers; i++){       id = players[i]       get_user_origin(id, origin)       client_print(id, print_chat, "Adding model ")       message_begin(MSG_BROADCAST, SVC_TEMPENTITY)       write_short(TE_PLAYERATTACHMENT)       write_entity(id)       write_coord( origin[2] + 50 )       write_short(roots)       write_short(100)       message_end()    }    set_task(10.0, "test_sprite", 457)    return PLUGIN_HANDLED }

When the test_sprite() routine is called I see this in console:

No model 1200!
No model 1424!

I know these models exist, I saw the download message when I first connected and the .dml file was precached...

Anyone have the answer?

Thanks
-Mug
Mugwump 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 17:15.


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