View Single Post
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 04-13-2013 , 21:04   Re: [TF2] Friendly Mode
Reply With Quote #25

Quote:
Originally Posted by salsav91 View Post
Can this somehow become class specific? Like only work for spies.
Maybe? I'll look into it when I can; it's not really a high priority for me.

Quote:
Originally Posted by salsav91 View Post
Also another interesting glitch. If someone has one of the blocked weapons, they can still use it if they go friendly with it in there hands.
A.K.A (Pyro air blast)
I am aware of this, and realized a solution literally as I was typing "I am aware of this." I should have the fix implemented in the next version of the plugin.

Quote:
Originally Posted by thetwistedpanda View Post
Not sure what was mysterious about the post I provided
Please understand that I know next to nothing about this stuff. I haven't done any sort of coding or programming since I took an "Introduction to Object Oriented Programming" (or whatever it was called) class at my local community college just under 4 years ago. I am using this plugin as an opportunity to learn this stuff. That being said, this was my initial instinct on how to implement that fix.

Code:
public OnEntityCreated(building, const String:classname[]) {
	if(entity > 0) {
		SDKHook(building, SDKHook_Spawn, OnEntitySpawned);
	}
}
If that didn't work, I would have tried:
Code:
public OnEntityCreated(building, const String:classname[]) {
	if(entity(building) > 0) {
		SDKHook(building, SDKHook_Spawn, OnEntitySpawned);
	}
}
If that didn't work, I would have tried:
Code:
public OnEntityCreated(building, const String:classname[]) {
	if(entity[building] > 0) {
		SDKHook(building, SDKHook_Spawn, OnEntitySpawned);
	}
}
I was close, at least.

Thank you for your help~
ddhoward is offline