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

Place model\image\sprite in constant position on screen


Post New Thread Reply   
 
Thread Tools Display Modes
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-26-2009 , 17:06   Re: Place model\image\sprite in constant position on screen
Reply With Quote #21

Tirant, since I don't know at all about making such models, is it possible you give -basically- how you woud do that ? ( in fast summary )
__________________
Arkshine is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 07-26-2009 , 17:59   Re: Place model\image\sprite in constant position on screen
Reply With Quote #22

Quote:
Originally Posted by Tirant View Post
Msg with a link with w/e you do with these. Chances are if you are gonna try and do what i think you are, i will be interested and want it. There are 2 models here, 512x512 and 512 x 384 it depends on if you want it stretched or whatnot.
lol this is nice. But, there is a thing: this is a view model so it also varies with cl_bob and forces you to not see your weapon. Can you make it to be like in hats plugin? a model to be attached to the player that permanently share his origin
__________________
joaquimandrade is offline
Tirant
Veteran Member
Join Date: Jul 2008
Location: Los Angeles, California
Old 07-27-2009 , 01:05   Re: Place model\image\sprite in constant position on screen
Reply With Quote #23

Possibly. Can't you just attach it and not replace it. what i did is took the knife v_ model and used it as a reference to find the exact spot for the picture. It isn't really as hard as it sounds, but it required a lot of trial and error. My only worry with using this method to apply overlays it that if you do like a server event it will get svc_bad errors from applying more then ~15. My idea for fixing this was to get 1 model using different textures/sub models and then replacing the c4. Each texture/submodel would be the messages (cts win, humans win, zombie win, etc). Then give everyone ingame the c4 but block it's use using bitsums and then whenever the event should be played the bitsums will reverse forcing c4 to be viewed and only the c4. I hope that makes sense. I really wanted to do something like this for my zombie mod but i never got around to it and am to busy to learn. If we can get something like this that'd be pretty cool and would add cool effects to zombie mods. For the hands models if we can't just attach it and not replace then I can add this to any hand model np. (you should hear my other ideas )
__________________

PM me if you're interested in buying the Credits addition for Base Builder
Battlefield Rebirth [66% done]
Call of Duty: MW2 [100% done]
Base Builder [100% done]
Tirant is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 07-27-2009 , 07:55   Re: Place model\image\sprite in constant position on screen
Reply With Quote #24

Trust me, forget the v_ model. It depends on cl_bob so its no good. Try to make one like the hats plugin.
__________________
joaquimandrade is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 07-27-2009 , 09:01   Re: Place model\image\sprite in constant position on screen
Reply With Quote #25

Or like in this plugin -> http://forums.alliedmods.net/showthread.php?p=512661 just make a model that once attached to player should stay a bit in front of him. Or you can make a sprite also...
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 07-27-2009 , 09:13   Re: Place model\image\sprite in constant position on screen
Reply With Quote #26

Had never saw that plugin. Gonna try it. About the conversation, with sprites it will not work because they can't have a offset from the origin. (I believe)
__________________
joaquimandrade is offline
Tirant
Veteran Member
Join Date: Jul 2008
Location: Los Angeles, California
Old 07-27-2009 , 11:29   Re: Place model\image\sprite in constant position on screen
Reply With Quote #27

I don't think the hat plugin renders the hat to the player it's attached to. We'd have to spawn it as a world model which would look like shit. Really our only option is my c4 idea. I'll look at the fog though. I dun think the fog works correctly though. It seems that the model is a non-rotating sphere so either we make it rotate with them to block the view, or we just repeat the pic (dumb idea). I dun think sprites would be our best option unless... hmm, what about this. we can't use a traditional world sprite, but what like changing a clients sprite, weather using a model or just replacing a muzzle flash (like mdl replacer). I can replace sprites on guns but i'm not sure how effective it will be, it would take come experimenting.
__________________

PM me if you're interested in buying the Credits addition for Base Builder
Battlefield Rebirth [66% done]
Call of Duty: MW2 [100% done]
Base Builder [100% done]
Tirant is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 07-27-2009 , 11:54   Re: Place model\image\sprite in constant position on screen
Reply With Quote #28

Quote:
Originally Posted by Tirant View Post
I don't think the hat plugin renders the hat to the player it's attached to. We'd have to spawn it as a world model which would look like shit. Really our only option is my c4 idea. I'll look at the fog though. I dun think the fog works correctly though. It seems that the model is a non-rotating sphere so either we make it rotate with them to block the view, or we just repeat the pic (dumb idea). I dun think sprites would be our best option unless... hmm, what about this. we can't use a traditional world sprite, but what like changing a clients sprite, weather using a model or just replacing a muzzle flash (like mdl replacer). I can replace sprites on guns but i'm not sure how effective it will be, it would take come experimenting.
The hats plugin renders the hat to everybody but, that we, coders, fix with code. It's easy. Forget the fog. It is done with messages. (But the concept is almost the same). Also forget the c4 idea unless you are just thinking to show it in the end of the round (But you won't need the c4 then). Anyway, my request is if you can make it to be used as an attached model. If you can, then i'll make the code to handle to make it visible to it's owner only.
__________________
joaquimandrade is offline
Tirant
Veteran Member
Join Date: Jul 2008
Location: Los Angeles, California
Old 07-27-2009 , 11:57   Re: Place model\image\sprite in constant position on screen
Reply With Quote #29

Try and get me the code so i can make the model using it. Like i can guess, but it's easier to just see what you are adjusting.
__________________

PM me if you're interested in buying the Credits addition for Base Builder
Battlefield Rebirth [66% done]
Call of Duty: MW2 [100% done]
Base Builder [100% done]
Tirant is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 07-27-2009 , 12:24   Re: Place model\image\sprite in constant position on screen
Reply With Quote #30

I'm having a problem. Maybe connor or arkshine can help. An attached model is not visible for the person to who it is attached. That's why we don't see the p_model of our weapon but only the v_model.

Edit:

here is the code:

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <engine>

#define PLUGIN    "New Plugin"
#define AUTHOR    "Unknown"
#define VERSION    "1.0"

new Model[] = "models/nihilanth.mdl"
new Entity

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_forward(FM_AddToFullPack,"addToFullPack",1)
}

public 
plugin_precache()
{
    
precache_model(Model)
}

public 
plugin_cfg()
{
    
Entity createEntity(Model)
}

public 
addToFullPack(eseenthosthostflagsplayerpSet)
{
    if((
ent == Entity) && (<= host <= 32))
    {
        static 
Float:origin[3]
        
pev(host,pev_origin,origin)
        
entity_set_origin(ent,origin)
        
        
set_es(es,ES_AimEnt,host)
        
set_es(es,ES_RenderMode,kRenderNormal)
        
set_es(es,ES_RenderAmt,100)
    }
}

createEntity(model[])
{
    new 
ent create_entity("info_target")
    
    
assert ent;
    
    
set_pev(ent,pev_takedamage,0.0)
    
set_pev(ent,pev_solid,SOLID_NOT);
    
set_pev(ent,pev_movetype,MOVETYPE_FOLLOW)
    
    
fm_set_rendering(ent,.render=kRenderTransAlpha,.amount=0)
    
    
entity_set_model(ent,model)
    
    return 
ent

I'm sure it "works" because if you make it set_es(es,ES_AimEnt,host) to set_es(es,ES_AimEnt,2) and add a bot you will see the model on the bot
__________________

Last edited by joaquimandrade; 07-27-2009 at 12:35.
joaquimandrade 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 05:27.


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