Raised This Month: $51 Target: $400
 12% 

Invalid Plugin Error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mockers
Member
Join Date: May 2006
Location: Australia
Old 05-27-2006 , 06:54   Invalid Plugin Error
Reply With Quote #1

Hi.
Im new to all this amx scripting stuff so im not sure what this error means.
L 05/27/2006 - 186:01: [AMXX] Invalid Plugin (plugin "HostageMod.amxx")
HostageMod is a plugin im making if you need any of the code posted just ask.

Thanks in advanced
Mockers is offline
Send a message via AIM to Mockers Send a message via MSN to Mockers
cccpsmiley
Senior Member
Join Date: Mar 2006
Location: Los Angeles, CA
Old 05-27-2006 , 07:32  
Reply With Quote #2

Invalid plugin can only mean one thing

post your code man
cccpsmiley is offline
Send a message via AIM to cccpsmiley
Mockers
Member
Join Date: May 2006
Location: Australia
Old 05-27-2006 , 07:36  
Reply With Quote #3

Code:
#include <amxmodx>
#include <tsx>
#include <amxmisc>

// By Mockers aka Glen Chatfield
// Version 0.1b

new hostage_taken = 0
new playerid
new hostageid

public plugin_init() {
	register_plugin("Mockers' Hostage","Hostage 0.1b","Mockers")
	register_cvar("hostage_distance_start","200") // How close to start the hostage situation
	register_cvar("hostage_distance_max","800") // Maxiumum distance away from kidnappers during the situation

	register_concmd("amx_takehostage","take_hostage",ADMIN_ALL,"<name of hostage>")

	register_menucmd(register_menuid("Hostage"),1023,"hostage_menu")
}

// Uncomment to set your own:
// hostage_distance_start 200 // How close the person has to be to the hostage-to-be to start the hostage situation
// hostage_distance_max 800 // Maxiumum distance away from kidnappers the hostage can wander during the situation

public take_hostage(id) {
	if(hostage_taken == 0)
	{
		hostage_taken = 1
	}
	if(hostage_taken == 1)
	{
		client_print(id,print_chat,"[HostageMod] Someone else has already taken someone hostage.^nTry again later.")
		return PLUGIN_HANDLED
	}
	new arg[32], hname[32]
	read_argv(1,arg,31)
	new name[32], hostage[32], h_id
	hostage = arg
	h_id = cmd_target(id,hostage,12)
	get_user_name(id,name,31)
	get_user_name(h_id,hname,31)
	new origin[3], h_origin[3]
	if(!is_user_alive(id) || !is_user_alive(h_id)) return PLUGIN_HANDLED
	get_user_origin(id,origin)
	get_user_origin(h_id,h_origin)
	if(get_distance(origin,h_origin) > get_cvar_num("hostage_distance_start"))
	{
		client_print(id,print_chat,"[HostageMod] The player %s must be near you",hostage)
		return PLUGIN_HANDLED
	}
	hostage_menu(id,h_id)
	return PLUGIN_HANDLED
}

public hostage_menu(id,hid)
{
	new body[256]
	new key = (1<<0|1<<9)
	new name[32]
	get_user_name(id,name,31)
	format(body,sizeof(body),"Hostage^nPlayer %s is attempting to take you hostage.^nIf you accept, you will drop all your weapons but he^nwon't hurt you. If you decline, he will^nmost definatly shoot and kill you.^n^n1. Accept^n2.Decline",name)
	playerid = id
	show_menu(hid,key,body)
	return PLUGIN_HANDLED
}

public hostage_action(hid,key)
{
	if(!is_user_alive(hid)) return PLUGIN_HANDLED

	if(key == 0) hostage_accept(playerid,hid)
	if(key == 9) hostage_decline(playerid,hid)
	return PLUGIN_HANDLED
}

public hostage_accept(id,hid) {
	new name[32], hname[32]
	get_user_name(id,name,31)
	get_user_name(hid,hname,31)
	client_print(id,print_center,"%s has become your hostage.",hname)
	client_print(id,print_center,"If he runs away you may shoot him.")
	client_print(hid,print_center,"You are now %s's hostage.",name)
	client_print(hid,print_center,"Stay close to him or you will be shot.")
	for(new i=1;i<=35;i++)
	{
		client_cmd(hid,"weapon_%d; drop",i)
	}
	new hudstring[256]
	format(hudstring,255,"Attention ALL MCPD, SWAT and Army Units!^n %s has taken %s hostage!",name,hname)
	set_hudmessage ( 200, 100, 0, -1.0, 0.35, 0, 6.0, 12.0, 0.1, 0.2, 1+2 )
	show_hudmessage(0,hudstring)
	set_task(5.0,"checkhostagedistance",0,"",0,"b")
	playerid = id
	hostageid = hid
	return PLUGIN_HANDLED
}

public checkhostagedistance() {
	new origin[3], horigin[3]
	get_user_origin(playerid,origin)
	get_user_origin(hostageid,horigin)
	if(get_distance(origin,horigin) > get_cvar_num("hostage_distance_max"))
	{
		hostage_escape()
		return PLUGIN_HANDLED
	}
	return PLUGIN_HANDLED
}

public hostage_escape()
{
	hostage_taken = 0
	new name[32], hname[32], hudstring[256]
	get_user_name(playerid,name,31)
	get_user_name(hostageid,hname,31)
	client_print(hostageid,print_center,"You have left %s",name)
	client_print(playerid,print_center,"%s has left you",hname)
	format(hudstring,255,"Hostage %s has left %s",hname,name)
	set_hudmessage( 200, 100, 0, -1.0, 0.35, 0, 6.0, 12.0, 0.1, 0.2, 1+2 )
	show_hudmessage(0,hudstring)
}

public hostage_decline(id,hid)
{
	new name[32], hname[32], hudstring[256]
	get_user_name(id,name,31)
	get_user_name(hid,hname,31)
	client_print(id,print_center,"%s is making a break for it.",hname)
	client_print(hid,print_center,"!!!Make a break for it, %s is going to shoot you!!!",name)
	format(hudstring,255,"%s attempted to take %s hostage",name,hname)
	set_hudmessage( 200, 100, 0, -1.0, 0.35, 0, 6.0, 12.0, 0.1, 0.2, 1+2 )
	show_hudmessage(0,hudstring)
	hostage_taken = 0
}
Mockers is offline
Send a message via AIM to Mockers Send a message via MSN to Mockers
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-27-2006 , 08:30  
Reply With Quote #4

actually, it can mean a lot of things. The most common occurances of it are:
  • You compiled on 1.6x or 1.7x, and are running it on 1.0x or lower
  • You forgot to copy it into the ./plugins directory
  • You're have debug enabled, are compiling it on 1.0x, and running it on 1.6x or 1.7x
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Mockers
Member
Join Date: May 2006
Location: Australia
Old 05-27-2006 , 08:39  
Reply With Quote #5

so i should redownload amxx cause some how the 1.71 compiler got mixed up with 1.01? (im running 1.01)
Mockers is offline
Send a message via AIM to Mockers Send a message via MSN to Mockers
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-27-2006 , 08:45  
Reply With Quote #6

Quote:
Originally Posted by Mockers
so i should redownload amxx cause some how the 1.71 compiler got mixed up with 1.01? (im running 1.01)
If your server is running 1.01 and you're using the 1.71 compiler, it'll never work.

Try downloading the 1.01 compiler and use that.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Mockers
Member
Join Date: May 2006
Location: Australia
Old 05-27-2006 , 09:05  
Reply With Quote #7

Thank you it worked.
*adds mental note: 1.01 and 1.71 are...DIFFERENT (not just the names)*
Mockers is offline
Send a message via AIM to Mockers Send a message via MSN to Mockers
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:57.


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