Raised This Month: $ Target: $400
 0% 

Problem: With creating EntityLight with custom Fields.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Stephen
Senior Member
Join Date: Aug 2004
Old 02-28-2006 , 15:19  
Reply With Quote #7

hmm ok.

I still get the same errors by compiling.
onthese Lines
Code:
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
Full code
Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <amxmisc>
#include <fun>

#define TE_ELIGHT 28

public plugin_init()
{
	register_plugin("stuff","Beta","Stephen")
	register_clcmd(".fx.fxEntityLight","EntityLight",ADMIN_ALL,"[coord], [coord], [coord], [Radius], [Red], [Green], [Blue], [Life], [DecayRate]")
	
	return PLUGIN_CONTINUE;
}
//Entity Light
//===================
public EntityLight(id, level, cid)
{
	if(!cmd_access(id,level,cid,2))
        	return PLUGIN_HANDLED

    	new szArg0[32]
	read_argv(0,szArg0,31)

	new szArg1[32]
	read_argv(1,szArg1,31)	

	new szArg2[32]
	read_argv(2,szArg2,31)

	new szArg3[32]
	read_argv(4,szArg3,31)

	new szArg4[32]
	read_argv(4,szArg4,31)

	new szArg5[32]
	read_argv(5,szArg5,31)

	new szArg6[32]
	read_argv(6,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
}
Stephen is offline
 



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 20:28.


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