Check if player is entering a area/zone
Hi,
how can i check, if a player is entering a specific area/zone on the map? Thanks |
Re: Check if player is entering a area/zone
There are some props you can check on a client to see if they're in a zone...
|
Re: Check if player is entering a area/zone
Can you give me an example? If I have the x, y and z-coordinates i want to check if a players has entered this zone.
|
Re: Check if player is entering a area/zone
Are they zones in a map (like buy zones or bomb planting zones)? What game is this for?
Example: With CS:S (and possibly others) you can check the bool of m_bInBuyZone the player has... other games might have other similar netprops dealing with zones. There's also m_b_InBombZone, and m_bInHostageRescueZone... |
Re: Check if player is entering a area/zone
The game is CS:S, but i want to check my own zone that i want to specify in the plugin, not the CSS-standard-zones like the buyzone, rescue-zone.
|
Re: Check if player is entering a area/zone
Check out how this plugin is coded: http://forums.alliedmods.net/showthread.php?t=152898
|
Re: Check if player is entering a area/zone
I've already checked this plugin and also the Death Zone-Plugin, but i can't get it. :/ Isn't there any tutorial for this?
|
Re: Check if player is entering a area/zone
This is a function I use for a plugin I made. The logic is in there and the code is pretty short. It just checks if a player is between two opposite corners of a zone in all 3 axes
PHP Code:
PHP Code:
PHP Code:
|
Re: Check if player is entering a area/zone
1 Attachment(s)
I ripped this method from cpmod, it is not my code.
This code uses a menu to setup coordinates for a zone and creates a sprite to outline the zone. In the example code the zone will increment any clients hp who stands within it. PS. I didn't proof read anything and this may contain code that isn't being used due to it being ripped to the point where my compiler was happy with it =p |
Re: Check if player is entering a area/zone
Thanks blaacky! I don't understand the CreateZonePoints-function (generate 8 zone points from just 2), can you give me an example how to use this with only 2 zone points?
|
All times are GMT -4. The time now is 10:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.