Raised This Month: $ Target: $400
 0% 

No Model 0.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Silencer123
Veteran Member
Join Date: Jul 2006
Old 12-11-2006 , 17:42   No Model 0.
Reply With Quote #1

I have this Code, used to enhance the messages in SvenCoop.
(In CS that would be things like "Fire in the Hole!")
Also, I want a sprite to appear above the players head,
which is the part which does not work. Please have a look someone:
Code:
#include <amxmodx> #include <amxmisc> #define VERSION "1.0" new bool:g_blocked[33] new g_whatis_scvao_followme public plugin_init() {     register_plugin("SC Talk AddOn",VERSION,"Silencer")     register_concmd("scvao_followme","SCVAO_FollowMe")     g_whatis_scvao_followme=precache_model("sprites/scvao_followme.spr") } public plugin_precache() {     precache_model("sprites/scvao_followme.spr")     precache_sound("speech/scvao_followme.wav") } public SCVAO_ReAllow(id) {     g_blocked[id]=false } public SCVAO_UnFollowMe(id) {     message_begin(MSG_ALL,SVC_TEMPENTITY)     write_byte(125)     write_byte(id)     message_end() } public SCVAO_FollowMe(id) {     if(!g_blocked[id])     {         message_begin(MSG_ALL,SVC_TEMPENTITY)         write_byte(124)         write_byte(id)         write_coord(65)         write_short(g_whatis_scvao_followme)         write_short(600)         message_end()         emit_sound(id,CHAN_STATIC,"speech/scvao_followme.wav",VOL_NORM,ATTN_NORM,0,PITCH_NORM)         set_task(2.0,"SCVAO_UnFollowMe",id)         set_task(4.0,"SCVAO_ReAllow",id)     }     else     {         client_print(id,print_notify,"You have to wait 4 seconds before performing this action again.")     } }
The *.wav plays, but the sprite does not appear. It says "No Model 0.",
as a notify message in the upper right corner of the screen.
__________________
EAT YOUR VEGGIES
Silencer123 is offline
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 12-11-2006 , 17:44   Re: No Model 0.
Reply With Quote #2

Code:
public plugin_precache() {     precache_model("sprites/scvao_followme.spr")     precache_sound("speech/scvao_followme.wav") }
Replace it with
Code:
public plugin_precache() {     g_whatis_scvao_followme = precache_model("sprites/scvao_followme.spr")     precache_sound("speech/scvao_followme.wav") }
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
Silencer123
Veteran Member
Join Date: Jul 2006
Old 12-11-2006 , 17:46   Re: No Model 0.
Reply With Quote #3

So that will set g_whatis_scvao_followme to whatever the precache_model thing is
and actually also precache the sprite file? Weird! Thanks, I will try!
;-)
__________________
EAT YOUR VEGGIES
Silencer123 is offline
Reply


Thread Tools
Display Modes

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 06:58.


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