Raised This Month: $ Target: $400
 0% 

Water Splash effect help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AZNDARKEVILDEMON
Senior Member
Join Date: Jun 2005
Location: USA
Old 09-12-2005 , 19:02   Water Splash effect help
Reply With Quote #1

Code:
/*************************************************************************************************************                                  AMX Splash Effect   Version: 0.1   Author: KRoT@L   0.1    Release   Splash effect when bullets hit water.     Cvar:   splash_effect 0/1  -    0: disables the plugin                           1: enables the plugin   Setup (AMX 0.9.9):   Install the amx file.   Enabled VexdUM (both in metamod/plugins.ini and amx/config/modules.ini) *************************************************************************************************************/ #include <amxmod> #include <amxmisc> #include <VexdUM> #include <VexdUM_stock> new lastwpn[33] new lastammo[33] new g_bubblesprite, g_splash public plugin_init() {   register_plugin("Splash Effect", "0.1", "KRoTaL")   register_cvar("splash_effect", "1")   register_event("CurWeapon", "make_splash", "be", "3>0") } public plugin_precache() {   g_bubblesprite = precache_model("sprites/bubble.spr")   g_splash = precache_model("sprites/wsplash3.spr") } stock waterInVicinity(Float:origin[3]) {   new Float:traceEnds[8][3]   traceEnds[0][0] = origin[0] - 2.0   traceEnds[0][1] = origin[1] - 2.0   traceEnds[0][2] = origin[2] - 2.0   traceEnds[1][0] = origin[0] - 2.0   traceEnds[1][1] = origin[1] - 2.0   traceEnds[1][2] = origin[2] + 2.0   traceEnds[2][0] = origin[0] + 2.0   traceEnds[2][1] = origin[1] - 2.0   traceEnds[2][2] = origin[2] + 2.0   traceEnds[3][0] = origin[0] + 2.0   traceEnds[3][1] = origin[1] - 2.0   traceEnds[3][2] = origin[2] - 2.0   traceEnds[4][0] = origin[0] - 2.0   traceEnds[4][1] = origin[1] + 2.0   traceEnds[4][2] = origin[2] - 2.0   traceEnds[5][0] = origin[0] - 2.0   traceEnds[5][1] = origin[1] + 2.0   traceEnds[5][2] = origin[2] + 2.0   traceEnds[6][0] = origin[0] + 2.0   traceEnds[6][1] = origin[1] + 2.0   traceEnds[6][2] = origin[2] + 2.0   traceEnds[7][0] = origin[0] + 2.0   traceEnds[7][1] = origin[1] + 2.0   traceEnds[7][2] = origin[2] - 2.0   for (new i = 0; i < 8; i++) {     if (PointContents(traceEnds[i]) == CONTENTS_WATER)     {       return 1     }   }   return 0 } public make_splash(id) {   new wpn = read_data(2)   new ammo = read_data(3)   if(get_cvar_num("splash_effect") == 1 && lastwpn[id] == wpn && lastammo[id] > ammo)   {     new iHitOrigin[3]     get_user_origin(id, iHitOrigin, 4)     new Float:fHitOrigin[3]     IVecFVec(iHitOrigin, fHitOrigin)     new iPlOrigin[3]     get_user_origin(id, iPlOrigin, 1)     new Float:fPlOrigin[3]     IVecFVec(iPlOrigin, fPlOrigin)     new Float:fVector[3]     fVector[0] = fHitOrigin[0] - fPlOrigin[0]     fVector[1] = fHitOrigin[1] - fPlOrigin[1]     fVector[2] = fHitOrigin[2] - fPlOrigin[2]     new Float:length = vector_length(fVector)     fVector[0] = fVector[0] / length * 10     fVector[1] = fVector[1] / length * 10     fVector[2] = fVector[2] / length * 10     new water = 0     new Float:fEndOrigin[3]     fEndOrigin[0] = fPlOrigin[0] + fVector[0]     fEndOrigin[1] = fPlOrigin[1] + fVector[1]     fEndOrigin[2] = fPlOrigin[2] + fVector[2]     new i = 0     while(trace_line(id, fPlOrigin, fEndOrigin, fPlOrigin) == -1 && i < 2000)     {       if(waterInVicinity(fPlOrigin))       {         water = 1         break       }       fEndOrigin[0] = fPlOrigin[0] + fVector[0]       fEndOrigin[1] = fPlOrigin[1] + fVector[1]       fEndOrigin[2] = fPlOrigin[2] + fVector[2]       i++     }     if(water)     {       FVecIVec(fPlOrigin, iHitOrigin)       message_begin(MSG_BROADCAST, SVC_TEMPENTITY, iHitOrigin)       write_byte(114)       write_coord(iHitOrigin[0])       write_coord(iHitOrigin[1])       write_coord(iHitOrigin[2])       write_coord(iHitOrigin[0])       write_coord(iHitOrigin[1])       write_coord(iHitOrigin[2])       write_coord(40)       write_short(g_bubblesprite)       write_byte(10)       write_coord(40)       message_end()       message_begin(MSG_BROADCAST, SVC_TEMPENTITY, iHitOrigin);       write_byte(17)       write_coord(iHitOrigin[0])       write_coord(iHitOrigin[1])       write_coord(iHitOrigin[2]+12)       write_short(g_splash)       write_byte(10)       write_byte(128)       message_end()     }   }   lastwpn[id] = wpn   lastammo[id] = ammo }

can anyone make this into amxmodx plugin?
AZNDARKEVILDEMON is offline
Send a message via AIM to AZNDARKEVILDEMON Send a message via Yahoo to AZNDARKEVILDEMON
KRoT@L
Member
Join Date: Aug 2004
Location: http://www.amxmod.net
Old 09-12-2005 , 19:12  
Reply With Quote #2

Thanks for removing my name from the plugin...
KRoT@L is offline
AZNDARKEVILDEMON
Senior Member
Join Date: Jun 2005
Location: USA
Old 09-12-2005 , 19:15  
Reply With Quote #3

KRoT@L , hey you, yes you, can u please create this plugin for amxmodx please =)
AZNDARKEVILDEMON is offline
Send a message via AIM to AZNDARKEVILDEMON Send a message via Yahoo to AZNDARKEVILDEMON
KRoT@L
Member
Join Date: Aug 2004
Location: http://www.amxmod.net
Old 09-12-2005 , 20:31  
Reply With Quote #4

You just have to modify 4 lines.
KRoT@L is offline
AZNDARKEVILDEMON
Senior Member
Join Date: Jun 2005
Location: USA
Old 09-12-2005 , 20:53  
Reply With Quote #5

which is..?
AZNDARKEVILDEMON is offline
Send a message via AIM to AZNDARKEVILDEMON Send a message via Yahoo to AZNDARKEVILDEMON
Zenith77
Veteran Member
Join Date: Aug 2005
Old 09-12-2005 , 21:03  
Reply With Quote #6

LMAO!

Code:
#include <amxmod> #include <amxmisc> #include <VexdUM> #include <VexdUM_stock>

to

Code:
#include <amxmodx> #include <amxmisc> #include <engine>
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
AZNDARKEVILDEMON
Senior Member
Join Date: Jun 2005
Location: USA
Old 09-12-2005 , 21:04  
Reply With Quote #7

lol thx but when i put it on my server it doesn't work, i shoot the water and nothing happen
AZNDARKEVILDEMON is offline
Send a message via AIM to AZNDARKEVILDEMON Send a message via Yahoo to AZNDARKEVILDEMON
Zenith77
Veteran Member
Join Date: Aug 2005
Old 09-12-2005 , 21:21  
Reply With Quote #8

No you dont..you need engine...


Trust me..you dont have any clue what your talking about....
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
AZNDARKEVILDEMON
Senior Member
Join Date: Jun 2005
Location: USA
Old 09-12-2005 , 21:30  
Reply With Quote #9

i mean is when i shoot the water it doesn't work i even got my engine module working and on amx_plugins it say its load but it doesn't work when i shoot the water
AZNDARKEVILDEMON is offline
Send a message via AIM to AZNDARKEVILDEMON Send a message via Yahoo to AZNDARKEVILDEMON
Zenith77
Veteran Member
Join Date: Aug 2005
Old 09-12-2005 , 21:37  
Reply With Quote #10

Its not the inlcudes...trust me...talk with krotal...
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 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 10:23.


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