Raised This Month: $ Target: $400
 0% 

ScreenFade (Specialists 3.0)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DotNetJunkie
Senior Member
Join Date: May 2005
Location: In front of my pc
Old 07-14-2007 , 10:10   ScreenFade (Specialists 3.0)
Reply With Quote #1

Anyone having problems with the ScreenFade message and The Specialists 3.0?

I pulled out some old code I know for a fact worked on 2.1 but it no longer
works in the 3.0 environment.

Code:
				message_begin(MSG_ONE, g_Msg_ScreenFade, { 0, 0, 0 }, players[i]);
				write_short(1<<15);
				write_short(1<<12);
				write_short(1<<12);
				write_byte(255);
				write_byte(255);
				write_byte(255);
				write_byte(255);
				message_end();
So unless something changed I have no idea, anyone else got any ideas?

Thanks!
__________________
DotNetJunkie is offline
Send a message via ICQ to DotNetJunkie Send a message via AIM to DotNetJunkie Send a message via MSN to DotNetJunkie Send a message via Yahoo to DotNetJunkie
Lotion
Member
Join Date: Apr 2005
Old 07-17-2007 , 04:19   Re: ScreenFade
Reply With Quote #2

Yeah this has really been pissing me off too, I hope someone can figure out why it doesn't work.
Lotion is offline
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 07-17-2007 , 16:06   Re: ScreenFade
Reply With Quote #3

Has anyone bothered posting at TS forums?
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-17-2007 , 16:12   Re: ScreenFade
Reply With Quote #4

Lord! How dare you suggest such a difficult task. I am disapointed!
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 07-17-2007 , 16:48   Re: ScreenFade
Reply With Quote #5

I must have been drugged when I wrote that comment (42 minutes ago). Why I might have well sent a man to his death bed.......What was I thinking!?!?!?
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-17-2007 , 17:01   Re: ScreenFade
Reply With Quote #6

lol
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
Minimum
Senior Member
Join Date: Jun 2006
Old 07-17-2007 , 19:09   Re: ScreenFade
Reply With Quote #7

I'm having similar problems with other things. Transparency code that worked in TS2.1 for me fails in TS3. Also, weapon spawn code that worked in TS2.1 fails in TS3.
Minimum is offline
Send a message via AIM to Minimum Send a message via MSN to Minimum
stupok
Veteran Member
Join Date: Feb 2006
Old 07-18-2007 , 01:22   Re: ScreenFade
Reply With Quote #8

Quote:
Originally Posted by Minimum View Post
I'm having similar problems with other things. Transparency code that worked in TS2.1 for me fails in TS3. Also, weapon spawn code that worked in TS2.1 fails in TS3.
I don't know what "Transparency code" is, but here's a function you can use to give weapons:


Code:
stock ts_giveweapon_custom(id, weaponid, clip, attachments)
{
	new value[16]
	if(weaponid > 37) return 0
	
	new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "ts_groundweapon"))
	
	if(!pev_valid(ent)) return 0
	
	formatex(value, 15, "%i", weaponid)
	set_keyvalue(ent, "tsweaponid", value)
	
	formatex(value, 15, "%i", clip)
	set_keyvalue(ent, "wextraclip", value)
	
	formatex(value, 15, "%i", attachments)
	set_keyvalue(ent, "spawnflags", value)
	
	return dllfunc(DLLFunc_Use, ent, id)
}

//Thank you Basic-Master
stock set_keyvalue(ent, key[], value[])
{
	new classname[32]
	pev(ent, pev_classname, classname, 31)
	set_kvd(0, KV_ClassName, classname)
	set_kvd(0, KV_KeyName, key)
	set_kvd(0, KV_Value, value)
	set_kvd(0, KV_fHandled, 0)
	
	dllfunc(DLLFunc_KeyValue, ent, 0)
}
I just tried doing some message logging with Damaged Soul's plugin and I couldn't get ScreenFade to fire, maybe you guys should try.
stupok is offline
Minimum
Senior Member
Join Date: Jun 2006
Old 07-18-2007 , 23:29   Re: ScreenFade
Reply With Quote #9

Quote:
Originally Posted by stupok69 View Post
I don't know what "Transparency code" is, but here's a function you can use to give weapons:


Code:
stock ts_giveweapon_custom(id, weaponid, clip, attachments)
{
	new value[16]
	if(weaponid > 37) return 0
	
	new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "ts_groundweapon"))
	
	if(!pev_valid(ent)) return 0
	
	formatex(value, 15, "%i", weaponid)
	set_keyvalue(ent, "tsweaponid", value)
	
	formatex(value, 15, "%i", clip)
	set_keyvalue(ent, "wextraclip", value)
	
	formatex(value, 15, "%i", attachments)
	set_keyvalue(ent, "spawnflags", value)
	
	return dllfunc(DLLFunc_Use, ent, id)
}

//Thank you Basic-Master
stock set_keyvalue(ent, key[], value[])
{
	new classname[32]
	pev(ent, pev_classname, classname, 31)
	set_kvd(0, KV_ClassName, classname)
	set_kvd(0, KV_KeyName, key)
	set_kvd(0, KV_Value, value)
	set_kvd(0, KV_fHandled, 0)
	
	dllfunc(DLLFunc_KeyValue, ent, 0)
}
I just tried doing some message logging with Damaged Soul's plugin and I couldn't get ScreenFade to fire, maybe you guys should try.
Whoa, that code is almost exactly the same as what I had to spawn weapons. I had no luck with this but I will try yours.

Code:
/*      Weapon Spawns */  stock ts_spawnweapon(weaponid[],duration[],extraclip[],spawnflags[],Float:Origin[3]) {     new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "ts_groundweapon"));     set_keyvalue(ent,"tsweaponid",weaponid);     set_keyvalue(ent,"wduration",duration);     set_keyvalue(ent,"wextraclip",extraclip);     set_keyvalue(ent,"spawnflags",spawnflags);     dllfunc(DLLFunc_Think,ent);     set_pev(ent,pev_origin,Origin);     return PLUGIN_HANDLED; } /*      Set Keyvalue - Coded by Basic-Master */  stock set_keyvalue(ent, key[], value[]) {     new classname[32]     pev(ent, pev_classname, classname, 31)     set_kvd(0, KV_ClassName, classname)     set_kvd(0, KV_KeyName, key)     set_kvd(0, KV_Value, value)     set_kvd(0, KV_fHandled, 0)         dllfunc(DLLFunc_KeyValue, ent, 0) }

EDIT: Tried what you have. It claims it spawned the weapon but the weapon is not there.

Last edited by Minimum; 07-18-2007 at 23:43.
Minimum is offline
Send a message via AIM to Minimum Send a message via MSN to Minimum
stupok
Veteran Member
Join Date: Feb 2006
Old 07-19-2007 , 00:18   Re: ScreenFade
Reply With Quote #10

My code works for sure, I've used it successfully.

This should do it for you, I haven't tested it though:

Code:
stock ts_spawnweapon(weaponid[],duration[],extraclip[],spawnflags[],Float:Origin[3]) {
    new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "ts_groundweapon"));
    set_keyvalue(ent,"tsweaponid",weaponid);
    set_keyvalue(ent,"wduration",duration);
    set_keyvalue(ent,"wextraclip",extraclip);
    set_keyvalue(ent,"spawnflags",spawnflags);
    //dllfunc(DLLFunc_Think,ent);
    //set_pev(ent,pev_origin,Origin);
    engfunc(EngFunc_SetOrigin, ent, Origin);
    //return PLUGIN_HANDLED;
}
stupok 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 21:35.


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