Raised This Month: $ Target: $400
 0% 

Coloring a sprite


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 05-01-2012 , 09:22   Coloring a sprite
Reply With Quote #1

Hy Allied Modders users, is there a way with a plugin to color a sprite like rain or snow ?
i have a Zombie Mod server and it will be usefull to make red rain

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

#pragma semicolon 1;

public plugin_init() {
    register_plugin("ENV Rain", "0.0.1", "AMXX Dev Team");
}

public plugin_precache() {
    engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "env_rain"));
}
Is it possible or i must edit and precache another sprite ? Thanks, if counts i use the Orpheu module too!
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers

Last edited by CryWolf; 05-01-2012 at 10:11. Reason: slowhack removed!
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-01-2012 , 09:37   Re: Coloring a sprite
Reply With Quote #2

I think it can not be done.

If you want to use costom sprite/color i think you need to recreate rain message.
.Dare Devil. is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 05-01-2012 , 09:40   Re: Coloring a sprite
Reply With Quote #3

Quote:
Originally Posted by CryWolf View Post
Is it possible or i must edit and precache another sprite ? Thanks
Your env_rain sprite is not precached in your plugin. It's just created. That's an entity which exists in game. You should do your sprite manually and after, precache it. Would be better to execute commands on players through client_putinserver.
__________________

Last edited by claudiuhks; 05-01-2012 at 09:41.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 05-01-2012 , 09:43   Re: Coloring a sprite
Reply With Quote #4

I think this is kind of slowhacking?

PHP Code:
client_cmd(id"cl_weather 1"); 
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 05-01-2012 , 09:46   Re: Coloring a sprite
Reply With Quote #5

Thanks, claudiuhks & Dare Devil where can i find an example of how to recreate the rain message ? please

If counts i'm using Orpheu module too, maybe this will help me alot...


Bilal Pro (sorry forgot to remove it from code)
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers

Last edited by CryWolf; 05-01-2012 at 10:09. Reason: details added!
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-01-2012 , 11:42   Re: Coloring a sprite
Reply With Quote #6

Quote:
Originally Posted by CryWolf View Post
Thanks, claudiuhks & Dare Devil where can i find an example of how to recreate the rain message ? please

If counts i'm using Orpheu module too, maybe this will help me alot...


Bilal Pro (sorry forgot to remove it from code)
Oh yeah, it is not just easy do recreate rain message, but im working on it right now.

I always reach the entity limit of hl, and if i use the only 4-6 rain sprite then it is just so no-real.

I mean rain go through the roof/models/walls/grounds.
if i can cut somehow sprite to pieces then it will work.

But now on i have idea to create rain with model.
Anyway i start now with model rain plugin/model and if its done i will upload it.

its so easy to change rain color / texture then too.
.Dare Devil. is offline
ROKronoS
Senior Member
Join Date: Oct 2010
Location: Bucharest, Romania
Old 05-01-2012 , 12:43   Re: Coloring a sprite
Reply With Quote #7

There is a way but for what I know it works only for env_sprite:

PHP Code:
new Float:EntColor];

EntColor] = 255.0/* Red */
EntColor] = 0.0/* Green */
EntColor] = 255.0/* Blue */

set_peventpev_rendercolorEntColor ); 
ROKronoS is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 05-01-2012 , 12:46   Re: Coloring a sprite
Reply With Quote #8

Quote:
Originally Posted by ROKronoS View Post
There is a way but for what I know it works only for env_sprite:

PHP Code:
new Float:EntColor];

EntColor] = 255.0/* Red */
EntColor] = 0.0/* Green */
EntColor] = 255.0/* Blue */

set_peventpev_rendercolorEntColor ); 
v.rendercolor will only work if entity has v.rendermode not equal with kRenderNormal and v.renderamt higher than zero.
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
ROKronoS
Senior Member
Join Date: Oct 2010
Location: Bucharest, Romania
Old 05-01-2012 , 12:48   Re: Coloring a sprite
Reply With Quote #9

Forgot to add
@CryWolf: Try and see if it works but i don't think it will

Last edited by ROKronoS; 05-01-2012 at 12:49.
ROKronoS is offline
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 05-01-2012 , 17:03   Re: Coloring a sprite
Reply With Quote #10

I cannot compile it only errors undefined symbols!
Code:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// redrain.sma
// E:\RiVaL\scripting\redrain.sma(21) : error 017: undefined symbol "ent"
// E:\RiVaL\scripting\redrain.sma(21) : warning 215: expression has no effect
// E:\RiVaL\scripting\redrain.sma(21) : warning 215: expression has no effect
// E:\RiVaL\scripting\redrain.sma(21) : error 001: expected token: ";", but foun
d ")"
// E:\RiVaL\scripting\redrain.sma(21) : error 029: invalid expression, assumed z
ero
// E:\RiVaL\scripting\redrain.sma(21) : fatal error 107: too many error messages
 on one line
//
// Compilation aborted.
// 4 Errors.
// Could not locate output file E:\RiVaL\scripting\compiled\redrain.amx (compile
 failed).
//
// Compilation Time: 0,11 sec
// ----------------------------------------

Press enter to exit ...
all of them on the same line
Code:
set_pev( ent, pev_rendercolor, EntColor );
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers

Last edited by CryWolf; 05-01-2012 at 17:04.
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
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:45.


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