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

[Help] Set Damage To Entity + Disable Bool


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zaidbt
Senior Member
Join Date: Jun 2014
Location: Morroco
Old 04-05-2015 , 10:23   [Help] Set Damage To Entity + Disable Bool
Reply With Quote #1

Hey =)
Only 1 last day to finish my naruto mod , i have 1 probleme if someone could help

1 SEt Damage To Entity
PHP Code:
#include <amxmodx> 
#include <fun> 
#include <engine> 
#include <fakemeta> 

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

new frostsprite;

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_forward(FM_CmdStart"fw_Start")
    
}
public 
plugin_precache()
{
    
frostsprite precache_model"sprites/fire_nade.spr" 
}
public 
fw_Start(iduc_handleseed

    new 
button get_uc(uc_handle,UC_Buttons
    
    if((
button IN_ATTACK2)) 
    {
        
use_cmd(id
    }
}   

public 
use_cmd(player

    
    new 
targetbody 
    get_user_aiming
playertargetbody1000
    
    if( 
is_user_alivetarget )) 
    { 
        
sprite_controlplayer 
    } 
    return 
PLUGIN_HANDLED 


public 
sprite_controlplayer 

    new 
vec
    new 
aimvec
    new 
velocityvec
    new 
length 
    
new speed 10 
    
    get_user_origin
playervec 
    
get_user_originplayeraimvec
    
    
velocityvec] = aimvec] - vec
    
velocityvec] = aimvec] - vec
    
velocityvec] = aimvec] - vec
    
length sqrtvelocityvec] * velocityvec] + velocityvec] * velocityvec] + velocityvec] * velocityvec] ) 
    
velocityvec] = velocityvec] * speed length 
    velocityvec
] = velocityvec] * speed length 
    velocityvec
] = velocityvec] * speed length 
    
    
new args
    
args] = vec
    
args] = vec
    
args] = vec
    
args] = velocityvec
    
args] = velocityvec
    
args] = velocityvec
    
    
set_task0.1"te_spray"0args8"a"
        

public 
te_sprayargs[ ] ) 

    
message_beginMSG_BROADCAST,SVC_TEMPENTITY 
    
write_byte120 // Throws a shower of sprites or models 
    
write_coordargs] ) // start pos 
    
write_coordargs] ) 
    
write_coordargs] ) 
    
write_coordargs] ) // velocity 
    
write_coordargs] ) 
    
write_coordargs] ) 
    
write_shortfrostsprite // spr 
    
write_byte// count 
    
write_byte70 // speed 
    
write_byte100 //(noise) 
    
write_byte// (rendermode) 
    
message_end( ) 

    return 
PLUGIN_CONTINUE 

public 
sqrtnum 

    new 
div num 
    
new result 
    
while( div result 
    { 
        
div = ( div result ) / 
        result 
num div 
    

    return 
div 

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1036\\ f0\\ fs16 \n\\ par }
*/ 
What to do if we want that the target receive Damages from the fire of the entity ?

thank you
__________________
http://steamcommunity.com/profiles/76561198044821965
=========Working On Naruto Mod========

Last edited by Zaidbt; 04-05-2015 at 12:15.
Zaidbt is offline
Shiina.Mashiro
Senior Member
Join Date: Sep 2014
Location: Vietnam
Old 04-05-2015 , 12:36   Re: [Help] Set Damage To Entity + Disable Bool
Reply With Quote #2

I don't see you're creating any entity for this.
__________________
Shiina.Mashiro is offline
Zaidbt
Senior Member
Join Date: Jun 2014
Location: Morroco
Old 04-05-2015 , 13:06   Re: [Help] Set Damage To Entity + Disable Bool
Reply With Quote #3

It's not mine . It kinda create an Spr ( Fire ) . But i need it to make damage to the aimed player Pls ? ty
__________________
http://steamcommunity.com/profiles/76561198044821965
=========Working On Naruto Mod========
Zaidbt is offline
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 04-06-2015 , 08:04   Re: [Help] Set Damage To Entity + Disable Bool
Reply With Quote #4

Yes we know that its a Sprite , but u need to create an entity for it ! to detect it in a touch event ...

Last edited by Freezo Begin; 04-06-2015 at 08:06.
Freezo Begin is offline
Zaidbt
Senior Member
Join Date: Jun 2014
Location: Morroco
Old 04-06-2015 , 15:47   Re: [Help] Set Damage To Entity + Disable Bool
Reply With Quote #5

More infos plz ? i didnt understand
__________________
http://steamcommunity.com/profiles/76561198044821965
=========Working On Naruto Mod========
Zaidbt is offline
Reply


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 11:10.


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