Raised This Month: $ Target: $400
 0% 

[TFC] Teleporter arrows


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
pizzahut
Senior Member
Join Date: Oct 2004
Old 03-18-2015 , 16:11   Re: [TFC] Teleporter arrows
Reply With Quote #5

Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>

// old tfc_i386.so (2012): 12
// new tfc.so (2013): 16
#define linux_diff 12

public plugin_init()
{
	register_plugin("pdata test", "1.4", "pizzahut")
	register_clcmd("say test", "say_test")
}

public say_test(id)
{
	static tele_id, tele_owner, tele_type
	client_print(id, print_chat, "Check console")
	tele_id = -1
	while (tele_id = find_ent_by_class(tele_id, "building_teleporter"))
	{
		client_print(id, print_console, "tele id: %d", tele_id)
		tele_owner = get_pdata_ent(tele_id, 332, linux_diff)
		if (is_valid_ent(tele_owner))
			client_print(id, print_console, "owner id: %d", tele_owner)
		tele_type = get_pdata_int(tele_id, 427)
		switch (tele_type)
		{
			case 4: client_print(id, print_console, "type: entrance")
			case 5: client_print(id, print_console, "type: exit")
		}
	}
	return PLUGIN_HANDLED
}

Last edited by pizzahut; 03-20-2015 at 20:15. Reason: .
pizzahut 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 06:56.


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