Raised This Month: $ Target: $400
 0% 

Visuals


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Troi
Member
Join Date: Aug 2006
Old 10-09-2007 , 03:12   Visuals
Reply With Quote #1

Ahh damn i were in wrong forum.. Hey, how to make glowing players only for one player?

something is wrong here ..... I guess everything
PHP Code:
public otherplayers(id) {
    if(
is_user_alive(id)) {
        if(
isview[id]!=1) {
            
set_user_rendering(idkRenderFxGlowShell255255 ,255kRenderGlow30)
        } else {
            
set_user_rendering(idkRenderFxNone0,0kRenderNormal255)            
        }
    }

Troi is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 10-09-2007 , 03:44   Re: Visuals
Reply With Quote #2

Man, I sware there was a topic just like this like a month ago, but I can't find it. If anyone knows where it is, please link it.

Anyway, for something this complex, you will have to hook AddToFullPack. There are two parameters that will guide you in that hook - ent, and host. Host is the viewer, and ent is who is being viewed.

Make sure you check that the arg "player" is true.

It'll look something like this...

Code:
public plugin_init() {    register_forward( FM_AddToFullPack, "hook_AddToFullPack_post", 1 ); } public hook_AddToFullPack_post( es_handle,e,ent,host,hostflags,player,pSet ) {    if( !player ) return FMRES_IGNORED;    if( host == person you want to be viewing && ent == person you want to be viewed )    {       // Make him glow...you can do this more proficiently with set_es()    }    return FMRES_IGNORED; }
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
Troi
Member
Join Date: Aug 2006
Old 10-10-2007 , 06:22   Re: Visuals
Reply With Quote #3

Whitch module have to be included if i want use "register_forward" ?
Troi is offline
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 10-10-2007 , 06:28   Re: Visuals
Reply With Quote #4

Fakemeta.
purple_pixie is offline
Troi
Member
Join Date: Aug 2006
Old 10-10-2007 , 08:02   Re: Visuals
Reply With Quote #5

Undefined symbol "FM_AddToFullPack"

Is there any other more simlpe way to make that rendering?
Troi is offline
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 10-10-2007 , 08:17   Re: Visuals
Reply With Quote #6

Nope.

FM_AddToFullPack is defined it fakemeta_const.inc, which is included by fakemeta.inc ...

You did include it with:
PHP Code:
#include <fakemeta> 
and not something slightly different right?

Wait ... register_forward() would be undefined otherwise.
purple_pixie is offline
Troi
Member
Join Date: Aug 2006
Old 10-10-2007 , 16:05   Re: Visuals
Reply With Quote #7

By the way. I always wanted to ask, but im shy couse its very noooobish... what means and what does that thing when writing

PHP Code:
public kasnors(id) {
new 
view[33]
new 
msg[51]
//codes...
//and etc....

I understand that is some constants.... Witch are using somewhere

and when using

PHP Code:
return PLUGIN_HANDLED
return PLUGIN_CONTINUE 
sry for that questions.... But it bothered me a long time...

By the way, is that usage correct?

PHP Code:
 public hook_AddToFullPack_postes_handle,e,ent,host,hostflags,player,pSet ) {
    if( !
player ) return FMRES_IGNORED
    
    
if( host == alien[32] && ent == human[32] ) {
        
set_user_rendering(playerkRenderFxGlowShell080255kRenderTransAlpha200)
    }
    if( 
host == alien[32] && ent == predator[32] ) {
        
set_user_rendering(playerkRenderFxGlowShell02550kRenderTransAlpha200)
    }
    if( 
host == alien[32] && ent == alien[32] ) {
        
set_user_rendering(playerkRenderFxGlowShell25500kRenderTransAlpha200)
    }
    return 
FMRES_IGNORED


Last edited by Troi; 10-10-2007 at 16:54.
Troi is offline
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 10-11-2007 , 04:33   Re: Visuals
Reply With Quote #8

PHP Code:
public kasnors(id) {
new 
view[33]
new 
msg[51]
//codes...
//and etc....

Well those two arrays ( view and msg ) actually only exist while the code is inside the function "kasnors", and they aren't constant.

What was it exactly you didn't get? Variables in general or what?

If it's PAWN in general you don't get, then there are some tutorials about.

return PLUGIN_HANDLED means that after your function has run, the game knows you did something.

return PLUGIN_CONTINUE tells the game to pretend your function never ran.

see the following:

PHP Code:
plugin_init()
{
    
register_clcmd("command","on_command")
}
public 
on_command(id)
{
    return 
PLUGIN_HANDLED ;

when a user puts "command" in their console, nothing will happen.
(the code does nothing except tell the game that you "did" the command)

If we change the PLUGIN_HANDLED to PLUGIN_CONTINUE, the console would say "unrecognised command: command" or whatever, because you told the game that you didn't handle it.
purple_pixie 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 16:13.


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