Raised This Month: $ Target: $400
 0% 

Rocket smoke poof trail.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fearAR
Veteran Member
Join Date: Oct 2010
Old 05-08-2012 , 21:43   Re: Rocket smoke poof trail.
Reply With Quote #1

PHP Code:
client_print(id,print_chat"Entity: %d (%d)",EntiOrigin[0]) 
-------->

PHP Code:
client_print(id,print_chat"Entity: %d (%d)",EntiOrigin[id][X]) 
It will return show you only the X coordinate.

Wait... Why do you called the directive MAX_PLAYERS like a player index?

You aren't understanding how it works...

I'll give you an example.

PHP Code:
entity_get_vector(Ent[id], EV_VEC_origin,Origin[MAX_PLAYERS]); 
----->

PHP Code:
entity_get_vector(Ent[id], EV_VEC_origin,Origin[id]); 
Do the same thing for the next lines.

Question: Will you use the origin variables for other reasons?, Else, you haven't to create it like a global variable and with a dimension more than the origin cells.

PHP Code:
#define MAX_PLAYERS 32

enum _:C_VECTOR
{
       
0,
       
Y,
       
Z
};

new 
Float:fOrigin[MAX_PLAYERS+1][C_VECTOR];
new 
iOrigin[MAX_PLAYERS+1][C_VECTOR];

public 
RocketTrail(id)
{
    
    
Ent[id] = find_ent_by_class(-1"ntf_squeak")
    
    
entity_get_vector(Ent[id], EV_VEC_origin,fOrigin[id]);
    
    
iOrigin[id][X] = floatround(fOrigin[id][X])
    
iOrigin[id][Y] = floatround(fOrigin[id][Y])
    
iOrigin[id][Z] = floatround(fOrigin[id][Z])
 
    
client_print(id,print_chat"Entity: %d (%d; %d; %d)",EntiOrigin[id][X], iOrigin[id][Y], iOrigin[id][Z])
    
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
    
write_byte(17);
    
write_coord(iOrigin[id][X]);
    
write_coord(iOrigin[id][Y]);
    
write_coord(iOrigin[id][Z]);
    
write_short(DustSpr)
    
write_byte(0.5);
    
write_byte(250);
    
message_end();

__________________
~~~~ NPC AI ~~~~

[ Pathfinding - OK ]
[ Citizen AI - OK ]
[ Handle Weapons - --- ]

Last edited by fearAR; 05-08-2012 at 22:03.
fearAR is offline
Send a message via MSN to fearAR
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 00:20.


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