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

ScreenFade (Specialists 3.0)


Post New Thread Reply   
 
Thread Tools Display Modes
DotNetJunkie
Senior Member
Join Date: May 2005
Location: In front of my pc
Old 07-18-2007 , 00:38   Re: ScreenFade
Reply With Quote #11

My only guess is that the TS team may have modified this message since in their changelog it mentions it added motion blur to screenfade so my only guess
is that we should start screwing around with it until it begins to work.
__________________
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
stupok
Veteran Member
Join Date: Feb 2006
Old 07-18-2007 , 01:22   Re: ScreenFade
Reply With Quote #12

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 #13

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 #14

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
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 07-19-2007 , 09:41   Re: ScreenFade
Reply With Quote #15

I assume the message name hasn't changed?

Anyway, download and activate SHPTools in my sig:
Server Console type:
logfile 1
hook_msg "ScreenFade"

log file is stored in AMXX/Logs directory.

On a final note:
Server Console type:
listmsg

It'll display all message hooks, so you might spot some new ones if any
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 08-28-2007 , 19:21   Re: ScreenFade
Reply With Quote #16

Here we go... found it with my SHPTools:
Code:
message_begin(MSG_ONE, get_user_msgid("TSFade"), _, id) write_short(819) write_short(4096) write_short(0) write_byte(200) write_byte(200) write_byte(250) write_byte(25) message_end()

Complete Message List for Specialists 3.0:
Code:
tempentity?
intermission?
cdtrack?
weaponanim?
roomtype?
director?
VoiceMask
ReqState
SelAmmo
CurWeapon
Geiger
Health
Damage
Battery
Train
HudText
SayText
TextMsg
WeaponList
ResetHUD
InitHUD
GameTitle
DeathMsg
ScoreInfo
TeamInfo
TeamScore
GameMode
MOTD
ServerName
AmmoPickup
WeapPickup
ItemPickup
HideWeapon
SetFOV
ShowMenu
ScreenShake
ScreenFade
TSFade
AmmoX
TeamNames
VGUIMenu
WeaponInfo
ClipInfo
WStatus
ActItems
KFuPower
TSHealth
TSArmor
TSState
TSCash
TSSpace
NextStunt
PwUp
PwUpTime
RoundTime
Objective
ShowObj
Wires
SrvSett
TSPAward
TSBTime
TSHVoice
TSFlag
CustomWP
Spectator
TSMBlur
TSMessage
TSSlowMo
PTakeDam
TSFrags
PlInfo
TSPSys
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd

Last edited by Orangutanz; 08-28-2007 at 19:26.
Orangutanz 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:36.


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