Raised This Month: $ Target: $400
 0% 

Displaying an image


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Toster v2.1
Senior Member
Join Date: Oct 2006
Location: Latvia, Riga
Old 06-14-2007 , 05:15   Displaying an image
Reply With Quote #1

Is there any way to display an image on client's screen (like the freezing img when sinking under water)
__________________
I am 52% addicted to Counterstrike. What about you?
Toster v2.1 is offline
Send a message via Skype™ to Toster v2.1
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 06-14-2007 , 05:46   Re: Displaying an image
Reply With Quote #2

Like in this tut? =>> http://forums.alliedmods.net/showthread.php?t=52529
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Toster v2.1
Senior Member
Join Date: Oct 2006
Location: Latvia, Riga
Old 06-15-2007 , 08:20   Re: Displaying an image
Reply With Quote #3

Thx!

-Edit

Is it possible to add a custom sprite?
__________________
I am 52% addicted to Counterstrike. What about you?

Last edited by Toster v2.1; 08-15-2007 at 10:22.
Toster v2.1 is offline
Send a message via Skype™ to Toster v2.1
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 06-15-2007 , 20:56   Re: Displaying an image
Reply With Quote #4

It should be. I think you can just precatch on and use that.
Styles is offline
Send a message via AIM to Styles
Toster v2.1
Senior Member
Join Date: Oct 2006
Location: Latvia, Riga
Old 08-15-2007 , 10:20   Re: Displaying an image
Reply With Quote #5

didn't work....

Code:
#include <amxmodx>
#include <fakemeta>


new iconstatus
new spr[] = "sprites/s.spr"

public plugin_init() {
    register_plugin("Status Icon","0.1","SAMURAI")
    
    iconstatus = get_user_msgid("StatusIcon")
    
    register_clcmd("+ico", "show")
    register_clcmd("-ico", "hide")  
}

public plugin_precache()
{
    precache_model(spr)
}

public show(id)
{
    message_begin(MSG_ONE,iconstatus,{0,0,0},id)
    write_byte(1)
    write_string(spr)
    write_byte(0)
    write_byte(255)
    write_byte(0)
    message_end()
    
}  

public hide(id)
{
    message_begin(MSG_ONE,iconstatus,{0,0,0},id)
    write_byte(0)
    write_string(spr)
    write_byte(0)
    write_byte(255)
    write_byte(0)
    message_end()
    
}
Maybe I did something wrong? I made a sprite just like one of the originals...
Attached Files
File Type: rar sprite.rar (752 Bytes, 69 views)
__________________
I am 52% addicted to Counterstrike. What about you?
Toster v2.1 is offline
Send a message via Skype™ to Toster v2.1
Drak
Veteran Member
Join Date: Jul 2005
Old 08-15-2007 , 14:22   Re: Displaying an image
Reply With Quote #6

I had problems to, I couldn't get it to work on any other mod besides CS.
What are you trying it on?
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Toster v2.1
Senior Member
Join Date: Oct 2006
Location: Latvia, Riga
Old 08-15-2007 , 15:28   Re: Displaying an image
Reply With Quote #7

CS....
__________________
I am 52% addicted to Counterstrike. What about you?
Toster v2.1 is offline
Send a message via Skype™ to Toster v2.1
Drak
Veteran Member
Join Date: Jul 2005
Old 08-15-2007 , 15:31   Re: Displaying an image
Reply With Quote #8

Well for one, you don't have to precache the sprite, the sprites that you can make show-up on the hud are already defined, and precached.
They have names there defined under, like "dmg_gas, dmg_shock,etc etc".
You have to use thoes names.

So change:
Code:
public show(id) {     message_begin(MSG_ONE,iconstatus,{0,0,0},id)     write_byte(1)     write_string(spr)     write_byte(0)     write_byte(255)     write_byte(0)     message_end()     }
To something like:
Code:
public show(id) {     message_begin(MSG_ONE,iconstatus,{0,0,0},id)     write_byte(1)     write_string("dmg_bio")     write_byte(0)     write_byte(255)     write_byte(0)     message_end()     }
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Toster v2.1
Senior Member
Join Date: Oct 2006
Location: Latvia, Riga
Old 08-16-2007 , 03:47   Re: Displaying an image
Reply With Quote #9

I know that.... I want to show a custom sprite!
__________________
I am 52% addicted to Counterstrike. What about you?
Toster v2.1 is offline
Send a message via Skype™ to Toster v2.1
Drak
Veteran Member
Join Date: Jul 2005
Old 08-16-2007 , 15:45   Re: Displaying an image
Reply With Quote #10

Quote:
Originally Posted by Toster v2.1 View Post
I know that.... I want to show a custom sprite!
You can't.... There's already been a long discussion about this. It's imposable.
All the sprites that can be shown are already defined.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
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 10:29.


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