SA-MP Forums Archive
how to preload objects? - 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: how to preload objects? (/showthread.php?tid=249070)



how to preload objects? - sasuga - 17.04.2011

Hello everybody, I have a Doubt, I want to know how to preload objects when you do a teleport to preload objects and then you got there does any one can helps me I use the Incognito's Streamer Plugin, does any one can help me plz


thx & bye


Re: how to preload objects? - Paul.eboy - 17.04.2011

I'm using this
Code:
if(strcmp(cmdtext, "/reloadobjects", true) == 0)
{
    if (Admin[playerid] >= 7)
	{
		SetTimer("reloadobjects", 2000, 0);
   		GameTextForAll("~w~Reloading Objects...", 1500, 1);
		GetPlayerName(playerid, sendername, sizeof(sendername));
		format(string, sizeof(string), "*** SETTINGS: %s has reloaded the objects.",sendername);
		SendClientMessageToAll(COLOR_SYSTEM, string);
		printf(string);
   		return 1;
   	}
	else
	{
		SendClientMessage(playerid, RED, "You are not the required admin level");
   		return 1;
   	}
}



Re: how to preload objects? - Robert_Crawford - 17.04.2011

Ummm, basicly when ever a player enters that are or an interior it freezes the players with a timer, the easiest way to do it is basicly just find out the object that the player stand on when he/she tp's there and make the createobject instead of createdynamicobject


Re: how to preload objects? - THE_KNOWN - 17.04.2011

Quote:
Originally Posted by Paul.eboy
View Post
I'm using this
Code:
if(strcmp(cmdtext, "/reloadobjects", true) == 0)
{
    if (Admin[playerid] >= 7)
	{
		SetTimer("reloadobjects", 2000, 0);
   		GameTextForAll("~w~Reloading Objects...", 1500, 1);
		GetPlayerName(playerid, sendername, sizeof(sendername));
		format(string, sizeof(string), "*** SETTINGS: %s has reloaded the objects.",sendername);
		SendClientMessageToAll(COLOR_SYSTEM, string);
		printf(string);
   		return 1;
   	}
	else
	{
		SendClientMessage(playerid, RED, "You are not the required admin level");
   		return 1;
   	}
}
how exactly r u reloading them? i think im going blind but all i see is a timer and 2 msgs. wheres the reloading part?


Re: how to preload objects? - Stigg - 17.04.2011

Use:
pawn Code:
Streamer_Update(playerid);
Or:
pawn Code:
Streamer_UpdateEx(playerid, Float:x, Float:y, Float:z);
When you teleport.


Re: how to preload objects? - sasuga - 17.04.2011

Quote:
Originally Posted by Stigg
View Post
Use:
pawn Code:
Streamer_Update(playerid);
Or:
pawn Code:
Streamer_UpdateEx(playerid, Float:x, Float:y, Float:z);
When you teleport.


Ok thx i will try this but i have a doubt, I put this native in the command and in Float Float:y and Float:z I put the coords of the place instead of puttig setplayer pos or I only put the coords of the place and then I put setplayerpos?


Re: how to preload objects? - Stigg - 17.04.2011

The setplayer pos X,Y,Z cord's.