This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Possible make light for my own objects ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-21-2008 , 11:09   Possible make light for my own objects ?
Reply With Quote #1

Possible make light for my own objects, i want to add in blockmaker
__________________
xPaw is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 08-21-2008 , 13:40   Re: Possible make light for my own objects ?
Reply With Quote #2

What kind of light ? i don't understand...
Alka is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-21-2008 , 13:46   Re: Possible make light for my own objects ?
Reply With Quote #3

just light, like lights from lamps
__________________
xPaw is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 08-21-2008 , 13:52   Re: Possible make light for my own objects ?
Reply With Quote #4

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)
Alka is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-21-2008 , 14:14   Re: Possible make light for my own objects ?
Reply With Quote #5

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 is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-21-2008 , 14:20   Re: Possible make light for my own objects ?
Reply With Quote #6

i added
PHP Code:
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
message_end() 
no crash, but light was fast like flashbang
__________________
xPaw is offline
Zero [UM-wFs]
Junior Member
Join Date: Aug 2008
Old 08-21-2008 , 14:23   Re: Possible make light for my own objects ?
Reply With Quote #7

do it in client postthink or make a loop ;)
__________________


Zero [UM-wFs] is offline
Send a message via Yahoo to Zero [UM-wFs]
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-21-2008 , 14:24   Re: Possible make light for my own objects ?
Reply With Quote #8

i just tested with clcmd
__________________
xPaw is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 08-21-2008 , 15:51   Re: Possible make light for my own objects ?
Reply With Quote #9

Single methode to make it stay is to make a loop, save the origin and recall the message with light.
Alka is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 08-21-2008 , 16:07   Re: Possible make light for my own objects ?
Reply With Quote #10

change this:
Code:
    write_byte(10)        // life in 10's
to a larger number
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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