[HELP]REP++ - 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)
+--- Thread: [HELP]REP++ (
/showthread.php?tid=568190)
[HELP]REP++ -
Mya - 20.03.2015
how to make my object is loaded again after blub?
Example : /glassjump, im playing glass jump and blub the glass, then im /glassjump again the glass is not spawned how to make the glass is spawned? please help me
Thanks and sorry for my bad english
Re: [HELP]REP++ -
De4dpOol - 20.03.2015
Use streamer plugin! it recreates the object again i think, when you go out from range and come in range again.
Or, you can delete and create it in regular interval.
Respuesta: [HELP]REP++ -
alexus - 20.03.2015
I think the best is the second. Use a timer to destroy and create again the objects you want.
An example of how to do:
Код:
new timer_reload;
forward ReloadObj();
CreateObj()
{
obj1 = CreateObject(......... // your code here
obj2 = CreateObject(.........
......
}
DestroyObj()
{
DestroyObject(obj1);
DestroyObject(obj2);
....
}
public ReloadObj()
{
DestroyObj();
CreateObj();
}
Thats an example so the variables name doesn't matter.
OnGameModeInit you have to start timer:
Код:
timer_reload = SetTimer("ReloadObj",1000,1); // 1000 = 1 sec
Re: [HELP]REP++ -
Mya - 20.03.2015
Quote:
Originally Posted by De4dpOol
Use streamer plugin! it recreates the object again i think, when you go out from range and come in range again.
Or, you can delete and create it in regular interval.
|
Fixed !! Thanks REP++ For You !!