Raised This Month: $ Target: $400
 0% 

need small fix


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
avril-lavigne
Banned
Join Date: Apr 2009
Old 02-08-2013 , 02:27   need small fix
Reply With Quote #1

Im trying to make simple fake death and vengeance plugin
I need help with spawn behind killers back.
can i use specified set_user_origin like origin[1]-20 . [2]+30. [3]+40 ???





PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <fun>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "me"

new Float:origin[3]

new 
g_MaxPlayers;
#define IsPlayer(%1)  ( 1 <= %1 <= g_MaxPlayers )

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHamHam_TakeDamage "player" "fw_HamTakeDamage" );
    
g_MaxPlayers get_maxplayers();
}


public 
fw_HamTakeDamageiVictim iInflictor iAttacker Float:fDamage iBitDamage 
{   
    if ( 
IsPlayeriAttacker ) && fDamage 85 ) {  
    
set_pev iVictimpev_deadflagDEAD_DYING )
    
set_pev(iVictimpev_framerate0.7);
    }
    
    if ( 
IsPlayeriAttacker ) && fDamage 95 ) {
    
set_pev(iVictimpev_deadflagDEAD_DEAD);
    
ExecuteHam(Ham_KillediVictimiAttacker0// just for testing what is better 
    
set_user_frags(iVictim,get_user_frags(iVictim) +1)
    
get_user_origin(iAttacker,origin,2)
    
set_task(2.0,"respawn_123",iVictim)
    }

}

public 
respawn_123(id) { 
   
set_pev(idpev_deadflagDEAD_NO);
   
spawn(id)   // or execute ham cs round respawn
   
set_user_origin(id,origin)   // i need here to spawn in attacker positions< but better if behind his back


__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc

Last edited by avril-lavigne; 02-08-2013 at 02:32.
avril-lavigne is offline
 


Thread Tools
Display Modes

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 20:34.


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