Raised This Month: $ Target: $400
 0% 

Entity Crash..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-13-2005 , 13:38   Entity Crash..
Reply With Quote #1

This seems to crash my server...

Code:
public place_camera(id) {         if( get_cvar_num("sv_camera") < 1 ) {                 client_print(id, print_chat, "[CAMERA] Camera MOD is disabled at this time!" )                 return PLUGIN_HANDLED             }         if( hasPlacedCamera[id] ) {                 client_print(id, print_chat, "[CAMERA] You already Placed a Camera! ")                 return PLUGIN_HANDLED     }         new camera = create_entity("info_target")     new origin[3]         // Logging         new name[32]     new authid[32]         get_user_name(id, name, 31)     get_user_authid(id, name, 31)         log_amx("<%s><><%s><> Set a Camera !", name, authid)         //---------------------             get_user_origin(id, origin, 3)         entity_set_origin(camera, Float:origin )         new Float:maxs[3] = {1.0,1.0,3.0}     new Float:mins[3] = {-1.0,1.0,-3.0}         entity_set_size(camera,mins,maxs)     entity_set_int(camera,EV_INT_solid, SOLID_NOT )         entity_set_string(camera, EV_SZ_classname, "camera" )         entity_set_float(camera,EV_FL_takedamage,1.0)     entity_set_float(camera,EV_FL_health,100.0) // prehaps some try bullets or a nade     // will fly by ?         entity_set_edict(camera, EV_ENT_owner, id)         hasPlacedCamera[id] = true             return PLUGIN_CONTINUE     }

anybody know why ?


p.s Log shows up, so it has something to due with the entity code.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
bahr
Member
Join Date: Aug 2005
Old 10-13-2005 , 14:25  
Reply With Quote #2

Replace

Code:
    get_user_origin(id, origin, 3)           entity_set_origin(camera, Float:origin )

by:

Code:
    get_user_origin(id, origin, 3)     Float: forigin[3]     IVecFVec(origin, forigin)     entity_set_origin(camera, forigin)

Hope this helps
bahr is offline
Send a message via MSN to bahr
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-13-2005 , 20:01  
Reply With Quote #3

Thank you and will try, I knew it was probably something to do with the origin.


Once again, thnx
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
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 23:41.


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