Raised This Month: $ Target: $400
 0% 

[solved] user_silentkill target


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 03-17-2009 , 09:18   [solved] user_silentkill target
Reply With Quote #1

user_silentkill() suicides a player without a deathmsg, how can I make it fake like it's been killed by someone... (not the deathmsg, I can do that) but the auto-aiming of that player who killed him instead of targeting himself (looking down from above)
__________________

Last edited by Hunter-Digital; 05-05-2009 at 11:02.
Hunter-Digital is offline
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 03-17-2009 , 09:34   Re: user_silentkill target
Reply With Quote #2

Use this stock:
PHP Code:
stock user_fakekilliKilleriVictim,  szWeapon[ ], iHeadShot )
{
    
message_beginMSG_ALLget_user_msgid"DeathMsg" ),  _)
    
write_byteiKiller )
    
write_byteiVictim )
    
write_byteiHeadShot )
    
write_stringszWeapon )
    
message_end( )

TheRadiance is offline
Send a message via ICQ to TheRadiance
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 03-17-2009 , 09:40   Re: user_silentkill target
Reply With Quote #3

Isn't that just a death message ? I don't want to fake kill a player, I want to kill him and fake the killer because in user_silentkill() the killer is the victim... aaaand like I said I can do a deathmsg and there's already a stock created in messages.inc
__________________
Hunter-Digital is offline
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 03-17-2009 , 09:49   Re: user_silentkill target
Reply With Quote #4

PHP Code:
user_killid)
user_fakekill( -1id"m4a1"// -1 will hide killer 
TheRadiance is offline
Send a message via ICQ to TheRadiance
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 03-17-2009 , 10:06   Re: user_silentkill target
Reply With Quote #5

Here's how it should be done(from VirusNade, but was on other plugins as well):

PHP Code:
/* Kill player, update score, money */
Killkillervictimweapon[] )
{
    
user_silentkillvictim );
    
    new 
kteam get_user_teamkiller );
    new 
vteam get_user_teamvictim );
    new 
kmoney fm_get_user_moneykiller );
    new 
kfrags;
    
    
// remove money if teamkill
    
if( kteam == vteam )
    {
        
kfrags get_user_fragskiller ) - 1;
        
fm_set_user_moneykillerkmoney 300);
    } else {
        
kfrags get_user_fragskiller ) + 1;
        
fm_set_user_moneykillerkmoney 300); // otherwise give kill bonus
    
}
    
    new 
vfrags get_user_fragsvictim );
    new 
kdeaths get_user_deathskiller );
    new 
vdeaths get_user_deathsvictim );
    
    
// update score
    
message_beginMSG_ALLg_msgscoreinfo );
    
write_bytekiller );
    
write_shortkfrags );
    
write_shortkdeaths );
    
write_short);
    
write_shortkteam );
    
message_end();
    
    
message_begin (MSG_ALLg_msgscoreinfo );
    
write_bytevictim );
    
write_shortvfrags+);
    
write_shortvdeaths );
    
write_short);
    
write_shortvteam );
    
message_end();
    
    
// set a death message
    
message_beginMSG_ALLg_msgdeathmsg, { 00}, );
    
write_bytekiller );
    
write_bytevictim );
    
write_byte);
    
write_stringweapon );
    
message_end();
    
    
Logkillervictimweapon );
}

/* Log Kill */
Logkillervictimweapond[] )
{
    new 
Buffer256 ];
    new 
kname32 ], vname32 ];
    new 
kteam16 ], vteam16 ];
    new 
kauth32 ], vauth32 ];
    new 
kidvid;
    
    
// killer info
    
get_user_namekillerkname31 );
    
get_user_teamkillerkteam,15 );
    
get_user_authidkillerkauth,31 );
    
kid get_user_useridkiller );
    
    
// victim info
    
get_user_namevictimvname31 );
    
get_user_teamvictimvteam15 );
    
get_user_authidvictimvauth31 );
    
vid get_user_useridvictim );
    
    
// teamkill message
    
(killer == victim
    ?
        
formatBuffersizeof Buffer 1"^"%s<%d><%s><%s>^" committed suicide with ^"%s^""vnamevidvteamvauthweapond )
    :
        
formatBuffersizeof Buffer 1"^"%s<%d><%s><%s>^" killed ^"%s<%d><%s><%s>^" with ^"%s^""knamekidkteamkauthvnamevidvteamvauthweapond );
    
    
log_message"%s"Buffer );

__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-05-2009 , 11:01   Re: user_silentkill target
Reply With Quote #6

Nope, I found it myself just now, it's:
PHP Code:
ExecuteHam(Ham_Killedvictimkillergib
when I execute that the victim's cammera turns and looks at the killer's position, THAT's what I wanted, because user_kill() and all other that uses that turns the cammera to the victim, like in suicide

topic solved
__________________
Hunter-Digital 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 08:57.


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