Jump to content

Hi, i need help with my script


Retsom3D
 Share

Recommended Posts

This is my script right now:

on player connect:

on player connect:
    if player's x-coordinate is smaller than 5125:
    if player's x-coordinate is bigger than -5125:
    if player's z-coordinate is smaller than 5125:
    if player's z-coordinate is bigger than -5125:
	wait for 1 second
	connect player to server "0a0"

What it does: As soon as a player connects to the Server he is redirected to server 0a0

What it is supposed to do: As soon as a player connects to the he is redirected to server 0a0 IF his coordinates are within the predefined area.

I have also tried to add a tab for each condition, but it makes no difference at all:

on player connect:
    if player's x-coordinate is smaller than 5125:
        if player's x-coordinate is bigger than -5125:
            if player's z-coordinate is smaller than 5125:
                if player's z-coordinate is bigger than -5125:
                    wait for 1 second
                    connect player to server "0a0"

I really need some help, i am stuck on this for a while now.

Link to comment
Share on other sites

try debugging the coordinates and broadcast a value after each check to see where the end is, aka

on player connect:
    send 1
    if player's x-coordinate is smaller than 5125:
        send 2, player's x-coordinate
        if player's x-coordinate is bigger than -5125:
            #etc

 

Link to comment
Share on other sites

42 minutes ago, snnwer said:

and your code might not be even valid, because a coordinate cannot be bigger than x (let it be a number) and smaller than x at the same time

but x=0 is bigger than x=-5000 and smaller than x=5000 at the same time

or is it not?

Link to comment
Share on other sites

2 hours ago, snnwer said:

try debugging the coordinates and broadcast a value after each check to see where the end is, aka

on player connect:
    send 1
    if player's x-coordinate is smaller than 5125:
        send 2, player's x-coordinate
        if player's x-coordinate is bigger than -5125:
            #etc

 

there is no end, the code connects me all the time. The issue is that it also connects me when it is not supposed to

Edited by Retsom3D
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share



×
×
  • Create New...