Posts: 882
Threads: 176
Joined: Aug 2011
Reputation:
0
I know how to assign a object to a specific playerid and detect if their near it. But how do I make the object for everyone? Say someone types /object and a object appears on the ground. I want anyone who goes near it to have something happen to them. How could I make this possible?
ANY help would be much appreciated. Thank you.
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
The streamer plugin's dynamic areas are probably the easiest way to tackle this problem. It has callbacks for entering and leaving an area as well.
Posts: 882
Threads: 176
Joined: Aug 2011
Reputation:
0
13.03.2014, 22:58
(
Последний раз редактировалось rangerxxll; 13.03.2014 в 23:36.
)
Yup. I'm just messing with them, and will hopefully create something cool out of experimentation. Thanks for the responses.
And just out of curiosity. I've been thinking about it a lot. My code is quite messy, and I was wondering how you organize your code properly? Do you include stocks/forwards/callbacks all under a different category separated by comments?
Posts: 1,164
Threads: 20
Joined: Oct 2008
Reputation:
0
Rather than complicating it with dynamic areas, Why don't you use IsValidDynamicObject + GetDynamicObjectPos (if you use dynamic objects, you can guess what the normal function is) + IsPlayerInRangeOfPoint? That's really the easiest way.
Also don't use stocks if it's a full gamemode. Use normal functions.