AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   how long are you flashed? (https://forums.alliedmods.net/showthread.php?t=22700)

Obbin 01-02-2006 05:37

how long are you flashed?
 
I wounder for how you are flashed. Any way of counting out that?

jsauce 01-02-2006 06:03

Code:
/* // msglogging plugin was used. MessageBegin ScreenFade(98) Arguments=7 Destination=One(1) Origin={0.000000 0.000000 0.000000} Entity=1 Classname=player Netname=jsauce Arg 1 (Short): 20851 Arg 2 (Short): 3112 Arg 3 (Short): 0 Arg 4 (Byte): 255 Arg 5 (Byte): 255 Arg 6 (Byte): 255 Arg 7 (Byte): 200 MessageEnd ScreenFade(98) */
The first two arguments determine the length of the flash and the last arg determines the level of the flash, whether its solid or transparent. So the higher the numbers in the first two args the longer it lasts. But i believe these are completely determined by the engine itself based on the distance from the flash and whether you were directly looking at it.

Obbin 01-02-2006 08:00

EDIT: everything solved but now i get an loose idention on the last return PLUGIN_CONTINUE, why?
Code:
#include <amxmodx> #include <amxmisc> #define PLUGIN  "Test" #define VERSION "Test" #define AUTHOR  "Test" new g_nMsgScreenFade public plugin_init() {     register_plugin(PLUGIN,VERSION,AUTHOR)     register_event("ScreenFade","FlashedEvent","be","4=255","5=255","6=255","7>199")     g_nMsgScreenFade = get_user_msgid("ScreenFade") } public FlashedEvent( id ) {     if( is_user_admin( id ) && !is_user_alive( id ) ){     message_begin( MSG_ONE,g_nMsgScreenFade,{0,0,0},id )     write_short( read_data( 1 ) )   // Duration     write_short( read_data( 2 ) )   // Hold time     write_short( read_data( 3 ) )   // Fade type     write_byte (0)          // Red     write_byte (0)          // Green     write_byte (0)          // Blue     write_byte ( read_data( 7 ) )   // Alpha     message_end()     return PLUGIN_HANDLED     } return PLUGIN_CONTINUE }

Thank you.

Dizzy 01-02-2006 10:52

Put

#pragma tabsize 0

at the top of your script

Loose indentation is because you didn't indent good

Good Indentation
Code:
get_bemode() {     new bemode[10]     get_cvar_string("bomb_mode",bemode,9)     return read_flags(bemode) }

Bad Indentation
Code:
get_bemode() {  new bemode[10]     get_cvar_string("bomb_mode",bemode,9) return read_flags(bemode) }

Obbin 01-02-2006 12:17

Ok, thx!

XxAvalanchexX 01-02-2006 13:57

Quote:

Originally Posted by Dizzy
Put

#pragma tabsize 0

at the top of your script

Plugin approvers don't like this.


All times are GMT -4. The time now is 16:04.

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