Limited Map Zone
I'm using this modified code originally created by Natsheh, to create a zone that would slap users who are outside of it, but it just kills me instantly as soon as I type /create.
PHP Code:
|
Re: Limited Map Zone
I think you should break after user_slap, probably it keeps slapping the player until he dies. Maybe you can use a task to periodically slap the player while he's in the zone.
|
Re: Limited Map Zone
Quote:
|
Re: Limited Map Zone
Code:
if( fUserOrigin[ 0 ] < fOrigin[ 0 ] || fUserOrigin[ 0 ] < fOrigin[ 0 ] || |
Re: Limited Map Zone
I made something but it slaps me when I'm close to the beams, like, I'm within the radius but stay close to them, it slaps me. Also when I'm in the radius but in the sky.
PHP Code:
|
Re: Limited Map Zone
Quote:
PS: What is the point of setting tasks with such ids |
Re: Limited Map Zone
Quote:
It will be hard to understand, so make sure you read this twice: - If I set the center origin of the zone in a high place, when you go close to the beams at the same height, you will get slapped as soon as you exceed the area, which is fine, but, if you go on a lower place, you'll get slapped even before touching the beam, is this a normal thing? Something like this https://image.ibb.co/gB6rTo/Miscalculation.png |
Re: Limited Map Zone
Quote:
EDIT it will be like: while (ent = find_ent_by_classname(ent, "player")) { // get user origin // create origin which will be : playerOrigin - centerOrigin // calculate its 2D length with that formula // check if it is higher than ur radius } |
Re: Limited Map Zone
Wouldn't saving every beams origin when it is created and then checking with a task work?
PHP Code:
|
Re: Limited Map Zone
Quote:
|
| All times are GMT -4. The time now is 12:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.