SA-MP Forums Archive
make certain objects load faster - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: make certain objects load faster (/showthread.php?tid=278015)



make certain objects load faster - rekatluos - 20.08.2011

Ok so i took a prison MAP ,i changed everything so my new jal is there ,but the problem is ,because the objects dont load fast enough ,at server restart (or player login if they are in jail) they fall under the jail ,into the water


im using midostreamer (createstreamobject) and i am looking for a way to make objects load faster (at least in that area so ppl wont fall)



any ideas? thx in advance


Re: make certain objects load faster - Kush - 20.08.2011

Quote:
Originally Posted by rekatluos
View Post
Ok so i took a prison MAP ,i changed everything so my new jal is there ,but the problem is ,because the objects dont load fast enough ,at server restart (or player login if they are in jail) they fall under the jail ,into the water


im using midostreamer (createstreamobject) and i am looking for a way to make objects load faster (at least in that area so ppl wont fall)



any ideas? thx in advance
Freeze them for 3-5 seconds. Then unfreeze them.


Re: make certain objects load faster - =WoR=G4M3Ov3r - 20.08.2011

I Advise you to use Incognito's Streamer and not midostreamer, then use

PHP Code:
CreateDynamicObject(modelidFloat:xFloat:yFloat:zFloat:rxFloat:ryFloat:rzworldid = -1interiorid = -1playerid = -1Float:distance 200.0); 
https://sampforum.blast.hk/showthread.php?tid=102865


Re: make certain objects load faster - rekatluos - 20.08.2011

i know about incognito's ,is it better than midostream and does it fix my problem ? (the gm i modified had midostream,but i can add incognito's too )


@kush - i dont get the freeze ,u say i should freeze my players when they go to jail for 3 seconds so they have time to load the objects or what?


Re: make certain objects load faster - Dragony92 - 20.08.2011

Quote:
Originally Posted by rekatluos
View Post
i know about incognito's ,is it better than midostream and does it fix my problem ? (the gm i modified had midostream,but i can add incognito's too )
Ok than use incognito's streamer, i think that should fix your problem....
Quote:
Originally Posted by rekatluos
View Post
@kush - i dont get the freeze ,u say i should freeze my players when they go to jail for 3 seconds so they have time to load the objects or what?
He told you to freeze players for few seconds onplayerlogin if player is jailed...


Re: make certain objects load faster - rekatluos - 21.08.2011

i tried with incognito's streamer , players still fall through the prison when they are sent there (doesnt matter if its on login or they just got caught )


any other idea? if i freeze them they will be frozen in the air or just unable to move ? if they are frozen in the air can you give me an example on how to do it ? (after or before setplayerposition)


Re: make certain objects load faster - rekatluos - 21.08.2011

bump


Re: make certain objects load faster - Rssc - 21.08.2011

I wanted to know how to "fix" this too...
How about cars? If I place a car on top of a object, it will fall in the water too.

EDIT: Nevermind, use what BATAD said.
CreateDynamicObject(modelid, Float, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 200.0);

The -1 makes that the object will be always streamed. (I think) There so, when your player is teleported to the jail the object will already be there.


Re: make certain objects load faster - Improvement™ - 21.08.2011

Quote:
Originally Posted by rekatluos
View Post
if they are frozen in the air can you give me an example on how to do it ? (after or before setplayerposition)
I believe the player will be frozen in the air, but I am not completly sure about it.
You could give it a try thought.

pawn Code:
TogglePlayerControllable(playerid, true); //This will freeze the player.
TogglePlayerControllable(playerid, false); //This will unfreeze the player.



Re: make certain objects load faster - sleepysnowflake - 21.08.2011

Yeah. You could use that with timers.
pawn Code:
TogglePlayerControllable(playerid, false); //Somewhere ...
SetTimer("UnFrezze",1000*3,0); // 1000*3 = 3 secounds. 0 For no repeating.

// Somewhere else :
forward UnFrezze(playerid);
public UnFrezze(playerid)
{
TogglePlayerControllable(playerid, true);
return 1;
}