Raised This Month: $32 Target: $400
 8% 

API Scripting Help help me make this work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
INst1Nct
Member
Join Date: Sep 2011
Location: Romania , Bucharest
Old 11-26-2014 , 05:36   help me make this work
Reply With Quote #1

Hey.
Today i had an ideea : to make thunder and lightning effect when infect humans. ( after deathtype effects model )
I modified a plugin , it can be compiled , it show only one warning :
Code:
 -----(42): warning 213: tag mismatch
I tested this plugin , but work only the thunder sound ....no lighning effect on infected human.
I need this to make a lighning above their heads ,when infected human.
Im noooooob
Attached Files
File Type: sma Get Plugin or Get Source (zplow_zm_13.sma - 450 views - 2.1 KB)

Last edited by INst1Nct; 11-26-2014 at 05:37.
INst1Nct is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 11-26-2014 , 09:18   Re: help me make this work
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <zombieplague>

new g_iOrigin[3], g_iCoord[3]
new 
g_Lightg_Smo2e

public plugin_init() 
{
    
register_plugin("Infect Effect""1.0""")
}

public 
plugin_precache()
{
    
precache_sound("ambience/thunder_clap.wav")
    
    
g_Smo2e precache_model("sprites/steam1.spr")
    
g_Light precache_model("sprites/lgtning.spr")
}

public 
zp_user_infected_post(id)
{
    
iThunder(id)   
}

public 
iThunder(id)
{
    
client_cmd(0,"speak ambience/thunder_clap.wav")
    
create_thunder(g_iCoordg_iOrigin)
}

create_thunder(vec1[3], vec2[3])
{
    
message_begin(MSG_BROADCAST,SVC_TEMPENTITY); 
    
write_byte(0); 
    
write_coord(vec1[0]); 
    
write_coord(vec1[1]); 
    
write_coord(vec1[2]); 
    
write_coord(vec2[0]); 
    
write_coord(vec2[1]); 
    
write_coord(vec2[2]); 
    
write_short(g_Light); 
    
write_byte(1);
    
write_byte(5);
    
write_byte(2);
    
write_byte(20);
    
write_byte(30);
    
write_byte(200); 
    
write_byte(200);
    
write_byte(200);
    
write_byte(200);
    
write_byte(200);
    
message_end();

    
message_beginMSG_PVSSVC_TEMPENTITY,vec2); 
    
write_byte(TE_SPARKS); 
    
write_coord(vec2[0]); 
    
write_coord(vec2[1]); 
    
write_coord(vec2[2]); 
    
message_end();
    
    
message_begin(MSG_BROADCAST,SVC_TEMPENTITY,vec2); 
    
write_byte(TE_SMOKE); 
    
write_coord(vec2[0]); 
    
write_coord(vec2[1]); 
    
write_coord(vec2[2]); 
    
write_short(g_Smo2e); 
    
write_byte(10);  
    
write_byte(10)  
    
message_end();


Last edited by zmd94; 11-27-2014 at 05:34.
zmd94 is offline
INst1Nct
Member
Join Date: Sep 2011
Location: Romania , Bucharest
Old 11-27-2014 , 04:26   Re: help me make this work
Reply With Quote #3

no errors , no warnings , but not working
i mean the lighning

EDIT: solved , i maked it work thanks any way.

Last edited by INst1Nct; 11-27-2014 at 04:59.
INst1Nct is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 11-27-2014 , 05:35   Re: help me make this work
Reply With Quote #4

Nice. ;)

May you share it?
zmd94 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 22:04.


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