Raised This Month: $51 Target: $400
 12% 

EngFunc SetSize of model.With picture.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 02-26-2009 , 13:58   EngFunc SetSize of model.With picture.
Reply With Quote #1

Look at the picture.
The model won't be set by SetSize what I've done :/
Model can be angled whatever when I aimed.
I need just angle model by SetSize.

PHP Code:
        engfunc(EngFunc_SetSizewent,
        
Float:{-90.0,-5.0,-150.0},
        
Float:{90.0,5.0,150.0}); 
PHP Code:
#include <amxmodx>
#include <fakemeta>

#define fm_find_ent_by_class(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "classname", %2)
#define fm_remove_entity(%1) engfunc(EngFunc_RemoveEntity, %1)

#define PLUGIN "XxX"
#define AUTHOR "xbatista"
#define VERSION "0.1"
 
new g_maxplayers
new g_Classname1[] = "wall_brekeable"
new WallModel[] = "models/wall.mdl"

public plugin_precache()
{
    
precache_model(WallModel)
}
public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("+wall""wall"
    
g_maxplayers get_maxplayers()
    
register_logevent("logevent_round_end"2"1=Round_End"
    
//    register_forward(FM_Touch,"ForwardTouch")
}
public 
wall(id

    new 
targetbody;
    
get_user_aiming idtargetbody );

    if ( 
<= target <= g_maxplayers )
    {
        new 
s_Name32 ];
        
get_user_name targets_Namecharsmax target ) );
        return 
PLUGIN_HANDLED;
    }
    
    new 
went engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"func_wall")) 
    new 
Float:fVecAngle[3];
    new 
vecAim[3];
    
get_user_origin(idvecAim3//where the player is aiming
 
    
new Float:fOrigin[3];
    
IVecFVec(vecAimfOrigin); 
 
    
set_pev(wentpev_originfOrigin);
    
pev(idpev_anglesfVecAngle)
    
    
fVecAngle[0] = 0.0
    
    
if (fVecAngle[1] < 0.0)
    {
        
fVecAngle[1] *= (-1.0)
    }
    
    
set_pev(wentpev_classnameg_Classname1
    
engfunc(EngFunc_SetModelwentWallModel
    
set_pev(wentpev_anglesfVecAngle)
    
set_pev(wentpev_solidSOLID_BBOX
    
set_pev(wentpev_health500.0)
    
set_pev(wentpev_takedamageDAMAGE_YES)
    if ( ( (
fVecAngle[1] >= 45.0) && (fVecAngle[1] <= 135.0) ) )
    {
        
fVecAngle[1] = 90.0;
        
engfunc(EngFunc_SetSizewent,
        
Float:{-90.0,-5.0,-150.0},
        
Float:{90.0,5.0,150.0});
    }
    else
    {
        
fVecAngle[1] = 0.0;
        
engfunc(EngFunc_SetSizewent,
        
Float:{-5.0,-90.0,-150.0},
        
Float:{5.0,90.0,150.0});
    }
    return 
PLUGIN_CONTINUE;

public 
logevent_round_end(id)
{
    new 
went = -1;
    while( ( 
went fm_find_ent_by_class wentg_Classname1 ) ) )
        
fm_remove_entitywent ); 
}
//public ForwardTouch(Ptd,Ptr) 
//{ 
//    if(!pev_valid(Ptd))
//            return FMRES_IGNORED;
//    
//    new Classname[33]
//    pev(Ptd,pev_classname,Classname,32) 
//    
//    if(!equal(Classname,g_Classname1)) 
//            return FMRES_IGNORED;
//
//    return FMRES_IGNORED;
//} 
Sorry for bad eng.
Attached Thumbnails
Click image for larger version

Name:	MODEL.jpg
Views:	715
Size:	55.0 KB
ID:	37921  
xbatista is offline
Send a message via Skype™ to xbatista
Dr.G
Senior Member
Join Date: Nov 2008
Old 02-26-2009 , 14:30   Re: EngFunc SetSize of model.With picture.
Reply With Quote #2

check this http://forums.alliedmods.net/showthread.php?t=76707
__________________
Dr.G is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 02-26-2009 , 15:08   Re: EngFunc SetSize of model.With picture.
Reply With Quote #3

I don't know how to do :/
Hard to me.I'm learning about ents 2nd day .
Please help with my code.

Last edited by xbatista; 02-26-2009 at 15:10.
xbatista is offline
Send a message via Skype™ to xbatista
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 02-26-2009 , 15:15   Re: EngFunc SetSize of model.With picture.
Reply With Quote #4

inglesh roolz. try to say better what you want todo pls
__________________
xPaw is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 02-26-2009 , 15:18   Re: EngFunc SetSize of model.With picture.
Reply With Quote #5

!!!ENT!!! is creating good by SetSize,but !!!MODEL!!! won't...
xbatista is offline
Send a message via Skype™ to xbatista
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 07:29.


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