Raised This Month: $ Target: $400
 0% 

pls edit this *.sma that it doesnt need engine-module


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AllMassive
Senior Member
Join Date: Sep 2004
Location: /dev/urandom
Old 01-27-2006 , 06:10   pls edit this *.sma that it doesnt need engine-module
Reply With Quote #1

hi

I'm using this plugin for some time now - before the release of amxx 1.60 i was able to use it without the engine-module.
I found that script at the amx-forums and just changed the #include to amxmodx.

Could someone please look over this code and change the parts which needs the engine-module (if its possible).


Code:
/* AMX Mod script. 
*
* This is Johnny's edit of the death info beams, which
* allows all deaths to be seen (by all dead people).
*
* If you want to see it in action, go to my server:
* [DuDeS] - Freakin Sweet
* 129.237.51.145:27015
* 
* Death Info Beams by SpaceDude 
* This file is provided as is (no warranties). 
* 
*/ 

#include <amxmodx>

#define TE_BEAMPOINTS 0

new m_spriteTexture

public death(){
	new player_num = 0                          // A Player incrementer.
	new maxpl = get_maxplayers()+1              // Max players.
	new killer_id = read_data(1)                // Killer's player ID.
	new victim_id = read_data(2)                // Victim's player ID.
	new killer_team = get_user_team(killer_id)  // The team the killer's on.

	if (get_cvar_num("amx_deathbeams_enabled") == 1)
	{
		if (killer_id!=victim_id && killer_id)
		{
			new k_origin[3]
			new v_origin[3]
			get_user_origin(killer_id,k_origin)
			get_user_origin(victim_id,v_origin)
			
			for(player_num = 1;player_num < maxpl; player_num++)
			{
				if(is_user_alive(player_num)==0 && get_user_time(player_num)!= 0)
				{
					message_begin(MSG_ONE, SVC_TEMPENTITY,{0,0,0},player_num)
					write_byte( TE_BEAMPOINTS )
					write_coord(k_origin[0])
					write_coord(k_origin[1])
					write_coord(k_origin[2])
					write_coord(v_origin[0])
					write_coord(v_origin[1])
					write_coord(v_origin[2])
					write_short( m_spriteTexture )
					write_byte( 1 )   // framestart
					write_byte( 1 )   // framerate
					write_byte( 100 ) // life in 0.1's
					write_byte( 25 )  // width
					write_byte( 0 )   // noise

					// Set the color of the beam.
					if (get_cvar_num("amx_deathbeams_randcolor") == 1)
					{
						write_byte( random_num(50,255) ) // red
						write_byte( random_num(50,255) )   // green
						write_byte( random_num(50,255) )   // blue
					}
					else
					{
						if (killer_team == 1)
						{ // Terrorist
							write_byte( 255 ) // red
							write_byte( 0 )   // green
							write_byte( 0 )   // blue
						}
						else
						{ // Counter-terrorist
							write_byte( 0 )   // red
							write_byte( 0 )   // green
							write_byte( 255 )   // blue
					      	}
					}
					write_byte( 100 ) // brightness
					write_byte( 0 )   // speed
					message_end()
				}
			}
		}
	}
}

public plugin_precache() 
   m_spriteTexture = precache_model("sprites/dot.spr")

public plugin_init()
{
	register_plugin("All Death Beams","0.9","SpaceDude")
	register_event("DeathMsg","death","a")
	register_cvar("amx_deathbeams_enabled","1")
	register_cvar("amx_deathbeams_randcolor","0")
}
I really dont know why it worked without engine-module before - but i think its the right place to post my request.

thx
AllMassive is offline
Charming
BANNED
Join Date: Nov 2005
Location: Canada
Old 01-27-2006 , 06:42  
Reply With Quote #2

so its asking for engine correct? well all you would really have to do is remove ;engine.dll er something like that from ur modules.ini and add #include <engine>


Code:
/* AMX Mod script. * * This is Johnny's edit of the death info beams, which * allows all deaths to be seen (by all dead people). * * If you want to see it in action, go to my server: * [DuDeS] - Freakin Sweet * 129.237.51.145:27015 * * Death Info Beams by SpaceDude * This file is provided as is (no warranties). * */ #include <amxmodx> #include <engine> //#include <fun> // it might need this dunno but if it asks for it take away the "//" behind the include #define TE_BEAMPOINTS 0 new m_spriteTexture public death(){    new player_num = 0                          // A Player incrementer.    new maxpl = get_maxplayers()+1              // Max players.    new killer_id = read_data(1)                // Killer's player ID.    new victim_id = read_data(2)                // Victim's player ID.    new killer_team = get_user_team(killer_id)  // The team the killer's on.    if (get_cvar_num("amx_deathbeams_enabled") == 1)    {       if (killer_id!=victim_id && killer_id)       {          new k_origin[3]          new v_origin[3]          get_user_origin(killer_id,k_origin)          get_user_origin(victim_id,v_origin)                    for(player_num = 1;player_num < maxpl; player_num++)          {             if(is_user_alive(player_num)==0 && get_user_time(player_num)!= 0)             {                message_begin(MSG_ONE, SVC_TEMPENTITY,{0,0,0},player_num)                write_byte( TE_BEAMPOINTS )                write_coord(k_origin[0])                write_coord(k_origin[1])                write_coord(k_origin[2])                write_coord(v_origin[0])                write_coord(v_origin[1])                write_coord(v_origin[2])                write_short( m_spriteTexture )                write_byte( 1 )   // framestart                write_byte( 1 )   // framerate                write_byte( 100 ) // life in 0.1's                write_byte( 25 )  // width                write_byte( 0 )   // noise                // Set the color of the beam.                if (get_cvar_num("amx_deathbeams_randcolor") == 1)                {                   write_byte( random_num(50,255) ) // red                   write_byte( random_num(50,255) )   // green                   write_byte( random_num(50,255) )   // blue                }                else                {                   if (killer_team == 1)                   { // Terrorist                      write_byte( 255 ) // red                      write_byte( 0 )   // green                      write_byte( 0 )   // blue                   }                   else                   { // Counter-terrorist                      write_byte( 0 )   // red                      write_byte( 0 )   // green                      write_byte( 255 )   // blue                         }                }                write_byte( 100 ) // brightness                write_byte( 0 )   // speed                message_end()             }          }       }    } } public plugin_precache()    m_spriteTexture = precache_model("sprites/dot.spr") public plugin_init() {    register_plugin("All Death Beams","0.9","SpaceDude")    register_event("DeathMsg","death","a")    register_cvar("amx_deathbeams_enabled","1")    register_cvar("amx_deathbeams_randcolor","0") }
Charming is offline
Send a message via ICQ to Charming Send a message via AIM to Charming Send a message via MSN to Charming Send a message via Yahoo to Charming
AllMassive
Senior Member
Join Date: Sep 2004
Location: /dev/urandom
Old 01-27-2006 , 06:46  
Reply With Quote #3

Well thx for this fast reply.

BUT () - can you modify the script that i DONT NEED the engine-module.

Or are there routines which definatly need the engine-module ?
I used this script <amxx1.60 and i dont needed the engine module.
AllMassive is offline
AllMassive
Senior Member
Join Date: Sep 2004
Location: /dev/urandom
Old 01-27-2006 , 06:50  
Reply With Quote #4

Oh - dammit.

i didnt saw your first line in your post - i'll try.
i always thought that i need the modules that are mentioned by the #includes.
AllMassive is offline
AllMassive
Senior Member
Join Date: Sep 2004
Location: /dev/urandom
Old 01-27-2006 , 09:29  
Reply With Quote #5

Like i thought - still needs the engine module.

AllMassive is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 01-27-2006 , 11:45  
Reply With Quote #6

Just compile original code and install plugin correctly.
Engine not needed.
VEN is offline
AllMassive
Senior Member
Join Date: Sep 2004
Location: /dev/urandom
Old 01-27-2006 , 13:06  
Reply With Quote #7

Thats what i did multiple times - without the engine-module i got bad load .
AllMassive is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 01-27-2006 , 13:37  
Reply With Quote #8

Try commenting out the include line for engine.
Brad is offline
AllMassive
Senior Member
Join Date: Sep 2004
Location: /dev/urandom
Old 01-27-2006 , 13:47  
Reply With Quote #9

Thats what i started with - look at my first post.

The Original *.sma had '#include <amxmod>' - i changed it to '#include <amxmodx>.
With older Versions of AmxModX (before the 1.60 - i didnt use 1.55,) i ran the plugin without needing the engine-module.
Since i switched to Amxx 1.60 i need that Module - without the Engine-Module i get bad load
It was user 'Charming' who told me to add this '#include <engine> thing - but it didnt work either.
AllMassive is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 01-27-2006 , 15:04  
Reply With Quote #10

What does your AMXX log say about the error?
Brad is offline
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 07:27.


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