open.mp forum
[Pawn] Streamer question - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] Streamer question (/showthread.php?tid=886)



Streamer question - omcho - 2019-11-10

Let's start from 0



(note that when i say create i mean streamer code)



I have a house system and a house map that is let's say over the LSPD, and my LSPD and house map are created in -1 virutalworld so it's streamed in all VW's and let's say those maps have 22.2k objects together

so over 2k objects won't be streamed in



So my server owned wanted to do the next thing:



Change LSPD to Virutalworld 0



Create every house map in a seperate virutal world (starting from 1 to let's say 1000), that would create an? insane amount of objects but I don't know if that is a problem or not since the Streamer destroy's them when none's near them



So then my LSPD map would have 12k objects( in VW 0 ) and all would be streamed in, and when a player enters his house i set his virutal world to his house id (1000 here) and then he wouldn't be able to see the LSPD map and my house map would be streamed with the remaining objects



But my main question is would that create insane lag or would that be a good idea?

Bear in mind i can't use a single VW for all the houses since all player's would be set in one VW (not a good idea, since players would see other players houses)


RE: Streamer question - Pinch - 2019-11-10

You have LSPD map, set its interior ID to 0 (not -1)



You have global map for house, change it's vw to 10 for example (not -1, you don't need it in vw 0 because it's default and that's where all zara Gaming's players are)



Now when player enters House:



SetPlayerInterior(playerid, house_id);

( I assume it's AI so its starting value is 1 and no need for like I mentioned before, my baddy forgive me daddy )?



What we have done now?

Player's vw is same as LSPD map's but interior ids are different so lspd map won't be steamed (because that's how streamer works)?



On player exit house map



SetPlayerInterior(playerid, 0);

Now house map's interior is same as player id's but virtual world isn't so it won't be streamed.


RE: Streamer question - omcho - 2019-11-10

(2019-11-10, 06:08 PM)Pinch Wrote: You have LSPD map, set its interior ID to 0 (not -1)



You have global map for house, change it's vw to 10 for example (not -1, you don't need it in vw 0 because it's default and that's where all zara Gaming's players are)



Now when player enters House:



SetPlayerInterior(playerid, house_id);

( I assume it's AI so its starting value is 1 and no need for like I mentioned before, my baddy forgive me daddy )?



What we have done now?

Player's vw is same as LSPD map's but interior ids are different so lspd map won't be steamed (because that's how streamer works)?



On player exit house map



SetPlayerInterior(playerid, 0);

Now house map's interior is same as player id's but virtual world isn't so it won't be streamed.



I was also thinking of this and also asking them to re-do all the maps and just create the "global ones" in VW = 0 and the ones where the player's get teleported in 1/2 depends on the usage, thanks for your reply I would like to hear other opinions :)