AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Water Splah Effects convertion (https://forums.alliedmods.net/showthread.php?t=42801)

NemesisDelta 08-07-2006 18:14

Water Splah Effects convertion
 
Could anyone convert this to amxmodx?
http://djeyl.net/forum/index.php?showtopic=45261

Nothing more to say than....GREAT PLUGIN

NemesisDelta 08-23-2006 06:13

Re: Water Splah Effects convertion
 
16 Days "Bump"

Obbin 08-23-2006 10:00

Re: Water Splah Effects convertion
 
This compiles, not tested (Changing <amxmod> to <amxmodx> and <vexdum> to <engine>):
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:   Install the amx file.   Enabled VexdUM. *************************************************************************************************************/ #include <amxmodx> #include <amxmisc> #include <engine> 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 }

NemesisDelta 08-23-2006 10:33

Re: Water Splah Effects convertion
 
Yupp it compiles and runs...but it doesnt work...no effect appears...

VEN 08-23-2006 11:00

Re: Water Splah Effects convertion
 
1 Attachment(s)
Try the attachment.

BTW the code above should work. It's the same as below.

NemesisDelta 08-23-2006 12:50

Re: Water Splah Effects convertion
 
Ok loads without complications...but nothing happens when i shoot at the water...

VEN 08-24-2006 08:20

Re: Water Splah Effects convertion
 
True, the same for me. Ask the author if he tested the plugin.

NemesisDelta 08-24-2006 18:35

Re: Water Splah Effects convertion
 
Obbin VEN said...that i should ask you if you have tested this ((wonderfull at this moment not working)) Plugin

So now i start asking:
-----------------------
Obbin have you tested this Plugin?

VEN 08-25-2006 02:56

Re: Water Splah Effects convertion
 
Quote:

Author: KRoT@L

KRoT@L == Obbin?

KRoT@L 08-25-2006 07:00

Re: Water Splah Effects convertion
 
Quote:

Originally Posted by VEN (Post 372173)
True, the same for me. Ask the author if he tested the plugin.

No, I took the screenshot and added the splash effect with photostudio.....
If you don't know how to convert an amx plugin to amxx, that's not my fault.


All times are GMT -4. The time now is 09:46.

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