Raised This Month: $ Target: $400
 0% 

TE_BEAMENTS not working


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 07-20-2008 , 05:12   TE_BEAMENTS not working
Reply With Quote #1

As the title says,the TE_BEAMENTS message does nothing,and I can't find what I'm doing wrong.
Code:
BeamEnts(ent1,ent2,sprite,color[4] = {255,255,255,255}) {     server_print("BEAMENTS %d %d %d %d %d %d %d",ent1,ent2,sprite,color[0],color[1],color[2],color[3])     message_begin(MSG_BROADCAST,SVC_TEMPENTITY)         write_byte(TE_BEAMENTS)         write_short(ent1)     // start entity     write_short(ent2)    // end entity         write_short(sprite)    // sprite index     write_byte(1)        // starting frame     write_byte(1)        // frame rate in 0.1's     write_byte(50)        // life in 0.1's     write_byte(16)        // line width in 0.1's     write_byte(1)        // noise amplitude in 0.01's         // red, green, blue, brightness     for(new i=0; i < 4;i++)         write_byte(color[i])             write_byte(1)    // scroll speed in 0.1's         message_end() } public HookStartCommand(id) {     if(!is_user_admin(id) && !iPlayerHook_On[id])     {             client_print(id,print_chat,"[KZ] You don't have access to this command")         return PLUGIN_HANDLED     }         new ent= engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"info_target"))     if(!ent)         return PLUGIN_HANDLED     RegisterHamFromEntity(Ham_Think,ent,"fwHookThink")     dllfunc(DLLFunc_Spawn,ent)             set_pev(ent,pev_aiment,id)         new Float:vAimOrigin[3]     fm_get_aim_origin(id,vAimOrigin)     engfunc(EngFunc_SetOrigin,ent,vAimOrigin)         new Float:fNow     global_get(glb_time,fNow)     set_pev(ent,pev_nextthink,fNow + 0.01)         new Float:vOrigin[3]     pev(id,pev_origin,vOrigin)     BeamEnts(id,ent,iBeamSprite,{255,0,0,200})         iPlayerHook_Ent[id] = ent         return PLUGIN_HANDLED }

fwHookThink is okay,works fine,movement is correct.
The entity is created and deleted fine according to the logs.
The ent id's look right when printed in console.
No beam is shown.

Any ideas?
danielkza is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 07-21-2008 , 14:52   Re: TE_BEAMENTS not working
Reply With Quote #2

I solved the problem. Apparently both ents you want to beam must have a model and be visible.
danielkza is offline
Old 07-21-2008, 15:47
danielkza
This message has been deleted by danielkza. Reason: double post
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 05:29.


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