Raised This Month: $ Target: $400
 0% 

.end climbing map plugins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 10-12-2007 , 07:44   .end climbing map plugins
Reply With Quote #1

hi guys...

i see in some servers a plugin, when u say .end or /end u go to the end of the map (KZ maps)

any know about this plugin?


PD: and sorry for my bad english :S
Alucard^ is offline
Send a message via Skype™ to Alucard^
mazmaajinsh
Senior Member
Join Date: Apr 2005
Location: Latvia
Old 10-13-2007 , 14:50   Re: .end climbing map plugins
Reply With Quote #2

Here it is:
use /setend to set end position
use /delend if you want to delete end position
use /goend to go to end
Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#pragma semicolon 1

new g_Mapname[64], g_Filename[128];
 
public plugin_init()
{
	register_plugin("End position", "1.0", "mazmaajinsh");
	register_clcmd("say /goend", "goEnd");
	register_clcmd("say /setend", "setEnd", ADMIN_MAP, "");
	register_clcmd("say /delend", "delEnd", ADMIN_MAP, "");
	get_mapname(g_Mapname, 63);
	format(g_Filename, 127, "addons/amxmodx/configs/end/%s.txt", g_Mapname);
}

public goEnd(id)
{
	if (file_exists(g_Filename))
	{
		new temp[64], pos[3], str1[13], str2[13], str3[13];
		new file = fopen(g_Filename, "rt");
		while(!feof(file))
		{
			fgets(file, temp, 63);
			parse(temp, str1, 12, str2, 12, str3, 12);
		
			pos[0] = str_to_num(str1);
			pos[1] = str_to_num(str2);
			pos[2] = str_to_num(str3);
		
			engfunc(EngFunc_SetOrigin, id, pos);
		}
		client_print(id, print_chat, "* You have been teleported to end");
		fclose(file);
	}
	else
	{
		client_print(id, print_chat, "* No end position set");
	}
}

public setEnd(id, level, cid)
{
	if (!cmd_access(id, level, cid, 1))
	{
		client_print(id, print_chat, "* No access");
		return PLUGIN_HANDLED;
	}
	
	if (file_exists(g_Filename))
	{
		client_print(id, print_chat, "* End position already set. Write /delend");
	}
	else
	{
		new i[3], temp[128];
		pev(id, pev_origin, i);
		format(temp, 127, "%d %d %d", i[0], i[1], i[2]);
		write_file(g_Filename, temp, 0);
		client_print(id, print_chat, "* End position set");
	}
	return PLUGIN_HANDLED;
}

public delEnd(id, level, cid)
{
	if (!cmd_access(id, level, cid, 1))
	{
		client_print(id, print_chat, "* No acess");
		return PLUGIN_HANDLED;
	}
	
	if (file_exists(g_Filename))
	{
		delete_file(g_Filename);
		client_print(id, print_chat, "* End position deleted");
	}
	else
	{
		client_print(id, print_chat, "* No end position");
	}
	return PLUGIN_HANDLED;
}
oh and if it doesnt work try creating folder addons/amxmodx/configs/end/
but i have to warn you, if you use this at public server a lot of cheaters will have time about 1 second..
which kz mod are you using?
__________________
Ahujena

Last edited by mazmaajinsh; 10-13-2007 at 15:02.
mazmaajinsh is offline
Pokemon
Senior Member
Join Date: Mar 2008
Old 03-30-2008 , 14:01   Re: .end climbing map plugins
Reply With Quote #3

Gracias
Pokemon is offline
carnica05
New Member
Join Date: Dec 2013
Old 12-01-2013 , 23:56   Re: .end climbing map plugins
Reply With Quote #4

I want this plugin but reseting time when use /goend

Anyone can help?

Thanks.
carnica05 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 14:38.


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