AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Possible make light for my own objects ? (https://forums.alliedmods.net/showthread.php?t=76265)

xPaw 08-21-2008 11:09

Possible make light for my own objects ?
 
Possible make light for my own objects, i want to add in blockmaker

Alka 08-21-2008 13:40

Re: Possible make light for my own objects ?
 
What kind of light ? i don't understand...

xPaw 08-21-2008 13:46

Re: Possible make light for my own objects ?
 
just light, like lights from lamps

Alka 08-21-2008 13:52

Re: Possible make light for my own objects ?
 
You can use
Code:

#define TE_DLIGHT                  27      // Dynamic light, effect world, minor entity effect
// write_byte(TE_DLIGHT)
// write_coord(position.x)
// write_coord(position.y)
// write_coord(position.z)
// write_byte(radius in 10's)
// write_byte(red)
// write_byte(green)
// write_byte(blue)
// write_byte(life in 10's)
// write_byte(decay rate in 10's)


xPaw 08-21-2008 14:14

Re: Possible make light for my own objects ?
 
i tryed this, and my server charshed
PHP Code:

#include <amxmodx>

#define TE_DLIGHT 27    // Dynamic light, effect world, minor entity effect

public plugin_init()
{
    
register_plugin("","","")
    
register_clcmd("say /light""light")
}

public 
light(id)
{
    
client_print(idprint_chat"[AMXX] You made test light")
    
write_byte(TE_DLIGHT)    // Write byte
    
write_coord(-219)    // X
    
write_coord(-133)    // Y
    
write_coord(-379)    // Z
    
write_byte(10)        // radius in 10's 
    
write_byte(255)        // RED
    
write_byte(255)        // GREEN
    
write_byte(255)        // BLUE
    
write_byte(10)        // life in 10's
    
write_byte(10)        // decay rate in 10's



xPaw 08-21-2008 14:20

Re: Possible make light for my own objects ?
 
i added
PHP Code:

message_begin(MSG_BROADCASTSVC_TEMPENTITY)
message_end() 

no crash, but light was fast like flashbang

Zero [UM-wFs] 08-21-2008 14:23

Re: Possible make light for my own objects ?
 
do it in client postthink or make a loop ;)

xPaw 08-21-2008 14:24

Re: Possible make light for my own objects ?
 
i just tested with clcmd

Alka 08-21-2008 15:51

Re: Possible make light for my own objects ?
 
Single methode to make it stay is to make a loop, save the origin and recall the message with light.

Emp` 08-21-2008 16:07

Re: Possible make light for my own objects ?
 
change this:
Code:

    write_byte(10)        // life in 10's
to a larger number


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

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