Author Topic: SetPlayerWorldBounds...  (Read 3423 times)

0 Members and 1 Guest are viewing this topic.

Offline Synx

  • Street Thug
  • *
  • Posts: 27
    • View Profile
SetPlayerWorldBounds...
« on: May 01, 2011, 07:55:04 pm »
I want make world bounds over army base to nobody can't leave.

I tryed from this http://famp.ru/wiki/SetWorldBounds still not understand.

[pawn]SetWorldBounds(1780.2505,1588.6793,-304.5052,-86.6157);[/pawn]

Help please.

P.S. Sorry for bad English.

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: SetPlayerWorldBounds...
« Reply #1 on: May 01, 2011, 08:22:15 pm »
I want make world bounds over army base to nobody can't leave.

I tryed from this http://famp.ru/wiki/SetWorldBounds still not understand.

[pawn]SetWorldBounds(1780.2505,1588.6793,-304.5052,-86.6157);[/pawn]

Help please.

P.S. Sorry for bad English.

SetWorldBounds is bugged. You'll need to script a function that puts a player back in the army base when they try to leave.
Do not PM me for support.




Offline BIG[H]

  • Made Man
  • ***
  • Posts: 159
  • Sight of light
    • View Profile
Re: SetPlayerWorldBounds...
« Reply #2 on: May 02, 2011, 04:53:14 am »
I use Shadow Heekz One


Add These Two in Public's
Code: [Select]
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
    {
        return 1;
    }
    return 0;
}


and

Code: [Select]
public MapBounds()
{
for(new i = 0; i <= MAX_PLAYERS; i++) if(IsPlayerConnected(i) == 1) {
if(!PlayerToPoint(50,i,1780.2505,1588.6793,-304.5052,-86.6157)){
if(PlayerInfo[i][Spawned] == 1) {
SetPlayerPos(i,1780.2505,1588.6793,-304.5052,-86.6157,1.00,0);
 }
 }
}

At GameModeInit

Code: [Select]
SetTimer("MapBounds",15s00,0);
Outdoor city server Administrator, FS server owner!

Offline tato

  • Made Man
  • ***
  • Posts: 106
  • I bet u don't know me!
    • View Profile
    • EA Server
Re: SetPlayerWorldBounds...
« Reply #3 on: May 02, 2011, 07:37:51 am »
noooo!!! is not buged i used that i can give u the coordinates just from the military base???? ok i'll give u that one


just remplace the old one for that one
[pawn]SetWorldBounds(-1590.893,-1778.929,-90.53571,-306.4286);[/pawn]

it's working i already tried it
« Last Edit: May 02, 2011, 07:39:37 am by tato »