AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   read and set blindness (https://forums.alliedmods.net/showthread.php?t=11880)

the thing 03-30-2005 12:37

read and set blindness
 
Hey there !

I started learning small, yesterday and i tryed to figure out with all this stuff... How ever...

I got a idea for a plugin and now ive got a little problem and i wanted to ask you for help.

The problem is, to set a player ( who got blinded with a flashbang ( in cstrike ) ) unblinded.

I studied some flash plugins and i realized that

Code:
read_data(7)

is there to get out, if a player ist blinded... everything else is just "if" and a litte variable work, so thats not the problem. ( 255 should be the worth for complete blindness )

But how do i set a player unblind ?

for example, i would like to register a command who executes a funcion i will write, and this function contains code to unblind a blinded player in exchange for money. How do i do this ? Unblinding the player ?

I hope you know what i mean.. just unblind a player who had been blinded by a flashbang in counter-strike.

Im looking foreward to an answer, im really thankful for every comment ..

Great thx and greets

thing

amxxsean 03-30-2005 13:54

Well there was a sunglasses plugin you might be able to get some help from, search for it.

the thing 03-30-2005 14:28

at first thx for answer.

But i already took this plugin to hep my self ^^

it did not work, i found no command line which executes what i need. I found there the line to read if the person is blinded, but i did not find any line containing something to write unblindness.

But you are right ... there must be anything .. sure ... but i dont find it .
:/

Someone knows the solution exactly ?


( ill keep trying to find the command who sets the blindness / unblindness )

the thing 03-30-2005 14:47

the only thing i can find is "sun" it does not seem to be a variable ... i nowhere see an declaration of "sun" - but how can "sun" be a command that controls the blinding of players through flash grenades ?

mhhh ..

XxAvalanchexX 03-30-2005 23:14

A player becomes "blind" by sending a ScreenFade message, which just fades their screen to white and back. By sending another ScreenFade message, it should overwrite the other one.

Code:
message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id); write_short(1); // duration, ~0 is max write_short(1); // hold time, ~0 is max write_short(1<<12); // flags, no idea wtf 1<<12 is write_byte(0); // red write_byte(0); // green write_byte(0); // blue write_byte(0); // alpha message_end();

In this case, we only need to overwrite the old one, so our duration and hold time is 1.

It should be invisible anyway.

the thing 03-31-2005 07:25

oh big thanks.

This helps me a lot, i'll try that


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

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