1

I've created a map that exceeded 20,000 in x coordinates (east of los santos) and i've set my SetPlayerWorldBounds(playerid, 500000.00, -2000.00, 2000.00, -500000.00) and used the latest version of incognito plugin but when I reached more than 20,000 in x coordinates the objects won't load any more further and my car spawner script does not work anymore too.

What might be the possible cause of this and is there a way to fix this so I can map further?

Here's my code:

 [https://pastebin.com/09YV34uL][1]<br><br>

All of my Objects are inside game mode in the function OnGameModeInit()

P.S. I have only less than 1,500 Dynamic objects

1 Answers1

1

The server ignores any player updates that exceed 20000 or -20000 in X or Y axis and reports the last position that was within the bounds, making the streamer think you haven't moved. To increase the boundaries, you can use SetSyncBounds in YSF:

const Float:FLOAT_INFINITY = Float:0x7F800000;
SetSyncBounds(-FLOAT_INFINITY, FLOAT_INFINITY, -FLOAT_INFINITY, FLOAT_INFINITY);

This will accept any finite coordinates, which should be enough for any map.

IS4
  • 11,945
  • 2
  • 47
  • 86
  • Where will I put this? In my game mode? and which function I will put that snippet code also? –  Oct 13 '19 at 01:57
  • I am using your YSF plugin but it fails on loading because it does not have .dll plugin file, where can I find it? because it does not include in your github repo –  Oct 13 '19 at 02:52
  • 1
    @Denzell I do, check the [Releases](https://github.com/IllidanS4/YSF/releases) page. Place YSF.dll or YSF.so into the plugins directory, then modify server.cfg to have `plugins YSF` (Windows) or `plugins YSF.so` (Linux). Call `SetSyncBounds` in `OnGameModeInit`. – IS4 Oct 13 '19 at 09:33
  • Yes i've found it, it seems that I just got the wrong repository (lack of .dll file only for YFS). here's where I found it: https://github.com/IllidanS4/YSF/releases/download/R19/YSF_kurta999_version_R19.zip –  Oct 13 '19 at 10:06
  • Can i set the FLOAT_INFINITY's value larger than 0x7F800000 (2,139,095,040 in decimal)? I've reached the limit of FLOAT_INFINITY and the game pushes me back into the current bound limit –  Dec 16 '19 at 03:23
  • It seems I cannot bypass the integer limit of pawno scripting language which is 2,147,483,647 (7FFFFFFF in hexadecimal). That's why the game pushes me back when I reached the current limit coordinates. is there any other way to bypass this or adjust the limits larger than the current one? –  Dec 16 '19 at 05:27
  • 1
    @Denzell Infinity is infinity, not 2,147,483,647. The game works horribly at infinity, why would you ever want to build something there? However, if the position is not that huge, it is possible you have reached the internal limits of the streamer. Anyhow, there's not much you can do with that if that is the case. – IS4 Dec 16 '19 at 11:01
  • Fixed already. Didn't realize there was just a SetPlayerWorldBounds with wrong coordinates arguments that I put long time ago.. –  Dec 16 '19 at 15:31