Author Topic: WorldBounds  (Read 9263 times)

0 Members and 2 Guests are viewing this topic.

yazeen

  • Guest
Re: WorldBounds
« Reply #15 on: May 17, 2011, 11:15:44 am »
or try to use this software
http://www.megaupload.com/?d=4XY7VOK7
no virus link uploaded by me
i didn't create the software it's easy to use ok

i gave you that software! erm..

Topic:-
hmm i have a idea use Pickups around starfish island and when ppl goes through it set there pos to some where else and send a message "you are not allowed to come here" xD Just an idea

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: WorldBounds
« Reply #16 on: May 17, 2011, 02:07:16 pm »
Topic:-
hmm i have a idea use Pickups around starfish island and when ppl goes through it set there pos to some where else and send a message "you are not allowed to come here" xD Just an idea

Too many pickups could probably crash the server. You could just get the coordinates of the box around Starfish Island and use a function like this to keep them out.
[pawn]
new Float:Starfish_min_x = 0.0,
     Float:Starfish_max_x = 0.0,
     Float:Starfish_min_y = 0.0,
     Float:Starfish_max_y = 0.0,
     Float:Respawn_x = 0.0,
     Float:Respawn_y = 0.0,
     Float:Respawn_z = 0.0;

public StarfishForbidden()
{
    // Variables for players' current positions
    new Float:X,
            Float:Y,
            Float:Z;

    // Iterate through all connected players
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        // Player has to be connected
        if(IsPlayerConnected(i))
        {
            // Get player's current position
            GetPlayerPos(i, X, Y, Z);

            // They're in Starfish
            if(X > min_x && X < max_X && Y > min_y && Y < max_y)
            {
                // Remove them
                SetPlayerPos(i, Respawn_x, Respawn_y, Respawn_z, 25, 0, 0);

                // Send them a message
                SendClientMessage(i, COLOR_YELLOW, "You may not enter Starfish Island.");
            }
        }
    }
}
[/pawn]
[pawn]
SetTimer("StarfishForbidden", 1000, 1); // Check Starfish Island every second
[/pawn]
Do not PM me for support.




Offline tato

  • Made Man
  • ***
  • Posts: 106
  • I bet u don't know me!
    • View Profile
    • EA Server
Re: WorldBounds
« Reply #17 on: May 17, 2011, 06:09:34 pm »
or try to use this software
http://www.megaupload.com/?d=4XY7VOK7
no virus link uploaded by me
i didn't create the software it's easy to use ok

i gave you that software! erm..

Topic:-
hmm i have a idea use Pickups around starfish island and when ppl goes through it set there pos to some where else and send a message "you are not allowed to come here" xD Just an idea
yes... sorry for no credits but i uploaded in my account

Offline BIG[H]

  • Made Man
  • ***
  • Posts: 159
  • Sight of light
    • View Profile
Re: WorldBounds
« Reply #18 on: May 17, 2011, 11:29:13 pm »
[pawn]new Float:Starfish_min_x = 0.0,
     Float:Starfish_max_x = 0.0,
     Float:Starfish_min_y = 0.0,
     Float:Starfish_max_y = 0.0,
     Float:Respawn_x = 0.0,
     Float:Respawn_y = 0.0,
     Float:Respawn_z = 0.0;

public StarfishForbidden()
{
    // Variables for players&#039; current positions
    new Float:X,
            Float:Y,
            Float:Z;

    // Iterate through all connected players
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        // Player has to be connected
        if(IsPlayerConnected(i))
        {
            // Get player&#039;s current position
            GetPlayerPos(i, X, Y, Z);

            // They&#039;re in Starfish
            if(X > min_x && X < max_X && Y > min_y && Y < max_y)
            {
                // Remove them
                SetPlayerPos(i, Respawn_x, Respawn_y, Respawn_z, 25, 0, 0);

                // Send them a message
                SendClientMessage(i, COLOR_YELLOW, "You may not enter Starfish Island.");
            }
        }
    }
}
[/pawn]



BUGGED!
Outdoor city server Administrator, FS server owner!

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: WorldBounds
« Reply #19 on: May 18, 2011, 12:19:22 am »

BUGGED!


Maybe because the coordinates aren't set?
Quote
[pawn]
new Float:Starfish_min_x = 0.0,
     Float:Starfish_max_x = 0.0,
     Float:Starfish_min_y = 0.0,
     Float:Starfish_max_y = 0.0,
     Float:Respawn_x = 0.0,
     Float:Respawn_y = 0.0,
     Float:Respawn_z = 0.0;
[/pawn]
Do not PM me for support.




Offline tato

  • Made Man
  • ***
  • Posts: 106
  • I bet u don't know me!
    • View Profile
    • EA Server
Re: WorldBounds
« Reply #20 on: May 18, 2011, 05:25:20 am »
[pawn]new Float:Starfish_min_x = 0.0,
     Float:Starfish_max_x = 0.0,
     Float:Starfish_min_y = 0.0,
     Float:Starfish_max_y = 0.0,
     Float:Respawn_x = 0.0,
     Float:Respawn_y = 0.0,
     Float:Respawn_z = 0.0;

public StarfishForbidden()
{
    // Variables for players&#039; current positions
    new Float:X,
            Float:Y,
            Float:Z;

    // Iterate through all connected players
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        // Player has to be connected
        if(IsPlayerConnected(i))
        {
            // Get player&#039;s current position
            GetPlayerPos(i, X, Y, Z);

            // They&#039;re in Starfish
            if(X > min_x && X < max_X && Y > min_y && Y < max_y)
            {
                // Remove them
                SetPlayerPos(i, Respawn_x, Respawn_y, Respawn_z, 25, 0, 0);

                // Send them a message
                SendClientMessage(i, COLOR_YELLOW, "You may not enter Starfish Island.");
            }
        }
    }
}
[/pawn]



BUGGED!
the coordinates are 0.0 and it need to be set X_X!

Offline BIG[H]

  • Made Man
  • ***
  • Posts: 159
  • Sight of light
    • View Profile
Re: WorldBounds
« Reply #21 on: May 18, 2011, 10:58:05 am »
Fixed :)

[pawn]SetPlayerPos(i, Respawn_x, Respawn_y, Respawn_z, 25);[/pawn] no 0 , 0
Outdoor city server Administrator, FS server owner!