AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Light (https://forums.alliedmods.net/showthread.php?t=229071)

ironskillz1 11-01-2013 07:13

Light
 
I have a question.
Is it possible to
Code:

set_light
for only 1 person?

Shooting King 11-06-2013 07:08

Re: Light
 
A small Stock,
PHP Code:

stock SetLights(idiLightStyleszLightinfo[])
{
    
message_begin(MSG_ONE_UNRELIABLESVC_LIGHTSTYLE_id);    
    
write_byte(iLightStyle);
    
write_string(szLightinfo);
    
message_end();


For "set_light", use iLightStyle as 0 and szLightinfo as the brightness ("a", "b", ..., "z").
So if you want to set "z" (brightness) to a player,
PHP Code:

SetLights(id0"z"

More Info : Here.

ironskillz1 11-06-2013 08:08

Re: Light
 
Thanks dude, will try this out in my freetime

MPNumB 11-08-2013 11:07

Re: Light
 
I'd suggest MSG_ONE, not MSG_ONE_UNRELIABLE. I found the _UNRELIABLE to be... unreliable? :D


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

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