|
Author
|
Message
|
|
Senior Member
|

02-28-2006
, 14:36
Problem: With creating EntityLight with custom Fields.
|
#1
|
Quote:
|
register_clcmd(".fx.fxEntityLight","EntityLig ht",ADMIN_ALL,"[coord], [coord], [coord], [Radius], [Red], [Green], [Blue], [Life], [DecayRate]")
|
Quote:
//Entity Light
//===================
public EntityLight(id, level, cid)
{
if(!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new szArg0[32]
read_argv(1,szArg0,31)
new szArg1[32]
read_argv(1,szArg1,31)
new szArg2[32]
read_argv(1,szArg2,31)
new szArg3[32]
read_argv(1,szArg3,31)
new szArg4[32]
read_argv(1,szArg4,31)
new szArg5[32]
read_argv(1,szArg5,31)
new szArg6[32]
read_argv(1,szArg6,31)
if( !strlen(szArg0)|| !strlen(szArg1)|| !strlen(szArg2)|| !strlen(szArg3)|| !strlen(szArg4)|| !strlen(szArg5)|| !strlen(szArg6))
return PLUGIN_HANDLED
new spriteorigin4[3]
get_user_origin(id, spriteorigin4)
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
write_byte( TE_ELIGHT )
write_short( id )
write_coord( szArg0[0] ); //coord coord coord (position)
write_coord( szArg0[1] );
write_coord( szArg0[2] );
write_coord( szArg1 ) //coord radius
write_byte( szArg2 ) //Red
write_byte( szArg3 ) //Green
write_byte( szArg4 ) //Blue
write_byte( szArg5 ) //Life
write_coord( szArg6 ) //Decay Rate
message_end();
return PLUGIN_HANDLED
}
|
I wondered how i could make it so that when i wanna create that light that i can summon it in the color i want.
So i can enter custom number before it shows up.
|
|
|
|