[HELP] Make These Objects Auto-Respawn
#1

Can Someone PLEASE Copy These Objects, And Make Something In The Code So That They Respawn Every 20 Seconds!

Thank You!

OBJECTS I NEED TO RESPAWN:

Код:
CreateObject(3851,356.079,2534.977,38.500,0.0,-89.954,0.0);
CreateObject(3851,360.076,2534.978,38.500,0.0,-89.954,0.0);
CreateObject(3851,364.054,2534.977,38.500,0.0,-89.954,0.0);
CreateObject(3851,356.117,2546.234,38.500,0.0,-89.954,0.0);
CreateObject(3851,360.110,2546.222,38.500,0.0,-89.954,0.0);
CreateObject(3851,364.128,2546.197,38.500,0.0,-89.954,0.0);
CreateObject(3851,368.092,2546.214,38.500,0.0,-89.954,0.0);
CreateObject(3851,368.037,2534.968,38.500,0.0,-89.954,0.0);
CreateObject(3851,372.012,2534.950,38.500,0.0,-89.954,0.0);
CreateObject(3851,372.079,2546.201,38.500,0.0,-89.954,0.0);
CreateObject(3851,376.024,2534.936,38.500,0.0,-89.954,0.0);
CreateObject(3851,376.042,2546.204,38.500,0.0,-89.954,0.0);
CreateObject(3851,356.079,2534.977,22.710,0.0,-89.954,0.0);
CreateObject(3851,360.076,2534.978,22.691,0.0,-89.954,0.0);
CreateObject(3851,364.054,2534.977,22.671,0.0,-89.954,0.0);
CreateObject(3851,356.117,2546.234,22.632,0.0,-89.954,0.0);
CreateObject(3851,360.110,2546.222,22.577,0.0,-89.954,0.0);
CreateObject(3851,364.128,2546.197,22.539,0.0,-89.954,0.0);
CreateObject(3851,368.092,2546.214,22.539,0.0,-89.954,0.0);
CreateObject(3851,368.037,2534.968,22.652,0.0,-89.954,0.0);
CreateObject(3851,372.012,2534.950,22.632,0.0,-89.954,0.0);
CreateObject(3851,372.079,2546.201,22.539,0.0,-89.954,0.0);
CreateObject(3851,376.024,2534.936,22.600,0.0,-89.954,0.0);
CreateObject(3851,376.042,2546.204,22.539,0.0,-89.954,0.0);
CreateObject(3851,372.339,2529.338,24.632,0.0,0.0,-90.000);
CreateObject(3851,359.759,2529.377,24.691,0.0,0.0,-90.000);
CreateObject(3851,359.774,2551.853,24.578,0.0,0.0,-90.000);
CreateObject(3851,372.316,2551.830,24.539,0.0,0.0,-90.000);
CreateObject(3851,377.915,2534.997,24.598,0.0,0.0,-180.000);
CreateObject(3851,378.000,2546.233,24.538,0.0,0.0,-180.000);
CreateObject(3851,354.088,2535.014,24.712,0.0,0.0,-180.000);
CreateObject(3851,354.163,2546.181,24.633,0.0,0.0,-180.000);
CreateObject(3851,365.753,2529.341,24.670,0.0,0.0,-270.000);
CreateObject(3851,366.100,2551.794,24.541,0.0,0.0,-270.000);
CreateObject(3851,359.822,2551.853,28.547,0.0,0.0,-270.000);
CreateObject(3851,372.352,2551.830,28.377,0.0,0.0,-270.000);
CreateObject(3851,372.335,2529.338,28.611,0.0,0.0,-270.000);
CreateObject(3851,359.778,2529.377,28.673,0.0,0.0,-270.000);
CreateObject(3851,366.112,2551.794,28.474,0.0,0.0,-270.000);
CreateObject(3851,365.786,2529.341,28.633,0.0,0.0,-270.000);
CreateObject(3851,378.000,2546.222,28.481,0.0,0.0,-360.000);
CreateObject(3851,377.915,2535.005,28.548,0.0,0.0,-360.000);
CreateObject(3851,354.088,2534.995,28.653,0.0,0.0,-360.000);
CreateObject(3851,354.163,2546.190,28.624,0.0,0.0,-360.000);
CreateObject(3851,354.088,2534.984,32.609,0.0,0.0,-360.000);
CreateObject(3851,354.088,2534.974,36.532,0.0,0.0,-360.000);
CreateObject(3851,354.163,2546.177,32.617,0.0,0.0,-360.000);
CreateObject(3851,354.163,2546.217,36.565,0.0,0.0,-360.000);
CreateObject(3851,378.000,2546.229,32.448,0.0,0.0,-360.000);
CreateObject(3851,378.000,2546.228,36.397,0.0,0.0,-360.000);
CreateObject(3851,377.915,2535.003,32.520,0.0,0.0,-360.000);
CreateObject(3851,377.915,2534.949,36.488,0.0,0.0,-360.000);
CreateObject(3851,359.790,2551.853,32.492,0.0,0.0,-450.000);
CreateObject(3851,372.345,2551.830,32.342,0.0,0.0,-450.000);
CreateObject(3851,372.312,2529.338,32.600,0.0,0.0,-450.000);
CreateObject(3851,359.754,2529.377,32.620,0.0,0.0,-450.000);
CreateObject(3851,365.810,2529.341,32.532,0.0,0.0,-450.000);
CreateObject(3851,366.131,2551.794,32.473,0.0,0.0,-450.000);
CreateObject(3851,372.349,2551.830,36.312,0.0,0.0,-450.000);
CreateObject(3851,359.769,2551.853,36.443,0.0,0.0,-450.000);
CreateObject(3851,359.738,2529.377,36.567,0.0,0.0,-450.000);
CreateObject(3851,372.293,2529.338,36.548,0.0,0.0,-450.000);
CreateObject(3851,365.816,2529.341,36.473,0.0,0.0,-450.000);
CreateObject(3851,366.089,2551.794,36.423,0.0,0.0,-450.000); // end of glass dm
Reply
#2

Use Timer to respawn those

fx

Код:
OnGameModeInit

SetTimer("Objects",20000,true);
Then you make public

Код:
public Objects(playerid)
{
  CreateObject(3851,356.079,2534.977,38.500,0.0,-89.954,0.0);
CreateObject(3851,360.076,2534.978,38.500,0.0,-89.954,0.0);
CreateObject(3851,364.054,2534.977,38.500,0.0,-89.954,0.0);
CreateObject(3851,356.117,2546.234,38.500,0.0,-89.954,0.0);
CreateObject(3851,360.110,2546.222,38.500,0.0,-89.954,0.0);
CreateObject(3851,364.128,2546.197,38.500,0.0,-89.954,0.0);
CreateObject(3851,368.092,2546.214,38.500,0.0,-89.954,0.0);
CreateObject(3851,368.037,2534.968,38.500,0.0,-89.954,0.0);
CreateObject(3851,372.012,2534.950,38.500,0.0,-89.954,0.0);
CreateObject(3851,372.079,2546.201,38.500,0.0,-89.954,0.0);
CreateObject(3851,376.024,2534.936,38.500,0.0,-89.954,0.0);
CreateObject(3851,376.042,2546.204,38.500,0.0,-89.954,0.0);
CreateObject(3851,356.079,2534.977,22.710,0.0,-89.954,0.0);
CreateObject(3851,360.076,2534.978,22.691,0.0,-89.954,0.0);
CreateObject(3851,364.054,2534.977,22.671,0.0,-89.954,0.0);
CreateObject(3851,356.117,2546.234,22.632,0.0,-89.954,0.0);
CreateObject(3851,360.110,2546.222,22.577,0.0,-89.954,0.0);
CreateObject(3851,364.128,2546.197,22.539,0.0,-89.954,0.0);
CreateObject(3851,368.092,2546.214,22.539,0.0,-89.954,0.0);
CreateObject(3851,368.037,2534.968,22.652,0.0,-89.954,0.0);
CreateObject(3851,372.012,2534.950,22.632,0.0,-89.954,0.0);
CreateObject(3851,372.079,2546.201,22.539,0.0,-89.954,0.0);
CreateObject(3851,376.024,2534.936,22.600,0.0,-89.954,0.0);
CreateObject(3851,376.042,2546.204,22.539,0.0,-89.954,0.0);
CreateObject(3851,372.339,2529.338,24.632,0.0,0.0,-90.000);
CreateObject(3851,359.759,2529.377,24.691,0.0,0.0,-90.000);
CreateObject(3851,359.774,2551.853,24.578,0.0,0.0,-90.000);
CreateObject(3851,372.316,2551.830,24.539,0.0,0.0,-90.000);
CreateObject(3851,377.915,2534.997,24.598,0.0,0.0,-180.000);
CreateObject(3851,378.000,2546.233,24.538,0.0,0.0,-180.000);
CreateObject(3851,354.088,2535.014,24.712,0.0,0.0,-180.000);
CreateObject(3851,354.163,2546.181,24.633,0.0,0.0,-180.000);
CreateObject(3851,365.753,2529.341,24.670,0.0,0.0,-270.000);
CreateObject(3851,366.100,2551.794,24.541,0.0,0.0,-270.000);
CreateObject(3851,359.822,2551.853,28.547,0.0,0.0,-270.000);
CreateObject(3851,372.352,2551.830,28.377,0.0,0.0,-270.000);
CreateObject(3851,372.335,2529.338,28.611,0.0,0.0,-270.000);
CreateObject(3851,359.778,2529.377,28.673,0.0,0.0,-270.000);
CreateObject(3851,366.112,2551.794,28.474,0.0,0.0,-270.000);
CreateObject(3851,365.786,2529.341,28.633,0.0,0.0,-270.000);
CreateObject(3851,378.000,2546.222,28.481,0.0,0.0,-360.000);
CreateObject(3851,377.915,2535.005,28.548,0.0,0.0,-360.000);
CreateObject(3851,354.088,2534.995,28.653,0.0,0.0,-360.000);
CreateObject(3851,354.163,2546.190,28.624,0.0,0.0,-360.000);
CreateObject(3851,354.088,2534.984,32.609,0.0,0.0,-360.000);
CreateObject(3851,354.088,2534.974,36.532,0.0,0.0,-360.000);
CreateObject(3851,354.163,2546.177,32.617,0.0,0.0,-360.000);
CreateObject(3851,354.163,2546.217,36.565,0.0,0.0,-360.000);
CreateObject(3851,378.000,2546.229,32.448,0.0,0.0,-360.000);
CreateObject(3851,378.000,2546.228,36.397,0.0,0.0,-360.000);
CreateObject(3851,377.915,2535.003,32.520,0.0,0.0,-360.000);
CreateObject(3851,377.915,2534.949,36.488,0.0,0.0,-360.000);
CreateObject(3851,359.790,2551.853,32.492,0.0,0.0,-450.000);
CreateObject(3851,372.345,2551.830,32.342,0.0,0.0,-450.000);
CreateObject(3851,372.312,2529.338,32.600,0.0,0.0,-450.000);
CreateObject(3851,359.754,2529.377,32.620,0.0,0.0,-450.000);
CreateObject(3851,365.810,2529.341,32.532,0.0,0.0,-450.000);
CreateObject(3851,366.131,2551.794,32.473,0.0,0.0,-450.000);
CreateObject(3851,372.349,2551.830,36.312,0.0,0.0,-450.000);
CreateObject(3851,359.769,2551.853,36.443,0.0,0.0,-450.000);
CreateObject(3851,359.738,2529.377,36.567,0.0,0.0,-450.000);
CreateObject(3851,372.293,2529.338,36.548,0.0,0.0,-450.000);
CreateObject(3851,365.816,2529.341,36.473,0.0,0.0,-450.000);
CreateObject(3851,366.089,2551.794,36.423,0.0,0.0,-450.000); // end of glass dm
return 1;
}
And remember to forward your public, on top of your script

Код:
forward Objects(playerid);
Reply
#3

Quote:
Originally Posted by kamilbam
Use Timer to respawn those

fx

Код:
OnGameModeInit

SetTimer("Objects",20000,true);
Then you make public

Код:
public Objects(playerid)
{
 CreateObject(3851,356.079,2534.977,38.500,0.0,-89.954,0.0);
CreateObject(3851,360.076,2534.978,38.500,0.0,-89.954,0.0);
CreateObject(3851,364.054,2534.977,38.500,0.0,-89.954,0.0);
CreateObject(3851,356.117,2546.234,38.500,0.0,-89.954,0.0);
CreateObject(3851,360.110,2546.222,38.500,0.0,-89.954,0.0);
CreateObject(3851,364.128,2546.197,38.500,0.0,-89.954,0.0);
CreateObject(3851,368.092,2546.214,38.500,0.0,-89.954,0.0);
CreateObject(3851,368.037,2534.968,38.500,0.0,-89.954,0.0);
CreateObject(3851,372.012,2534.950,38.500,0.0,-89.954,0.0);
CreateObject(3851,372.079,2546.201,38.500,0.0,-89.954,0.0);
CreateObject(3851,376.024,2534.936,38.500,0.0,-89.954,0.0);
CreateObject(3851,376.042,2546.204,38.500,0.0,-89.954,0.0);
CreateObject(3851,356.079,2534.977,22.710,0.0,-89.954,0.0);
CreateObject(3851,360.076,2534.978,22.691,0.0,-89.954,0.0);
CreateObject(3851,364.054,2534.977,22.671,0.0,-89.954,0.0);
CreateObject(3851,356.117,2546.234,22.632,0.0,-89.954,0.0);
CreateObject(3851,360.110,2546.222,22.577,0.0,-89.954,0.0);
CreateObject(3851,364.128,2546.197,22.539,0.0,-89.954,0.0);
CreateObject(3851,368.092,2546.214,22.539,0.0,-89.954,0.0);
CreateObject(3851,368.037,2534.968,22.652,0.0,-89.954,0.0);
CreateObject(3851,372.012,2534.950,22.632,0.0,-89.954,0.0);
CreateObject(3851,372.079,2546.201,22.539,0.0,-89.954,0.0);
CreateObject(3851,376.024,2534.936,22.600,0.0,-89.954,0.0);
CreateObject(3851,376.042,2546.204,22.539,0.0,-89.954,0.0);
CreateObject(3851,372.339,2529.338,24.632,0.0,0.0,-90.000);
CreateObject(3851,359.759,2529.377,24.691,0.0,0.0,-90.000);
CreateObject(3851,359.774,2551.853,24.578,0.0,0.0,-90.000);
CreateObject(3851,372.316,2551.830,24.539,0.0,0.0,-90.000);
CreateObject(3851,377.915,2534.997,24.598,0.0,0.0,-180.000);
CreateObject(3851,378.000,2546.233,24.538,0.0,0.0,-180.000);
CreateObject(3851,354.088,2535.014,24.712,0.0,0.0,-180.000);
CreateObject(3851,354.163,2546.181,24.633,0.0,0.0,-180.000);
CreateObject(3851,365.753,2529.341,24.670,0.0,0.0,-270.000);
CreateObject(3851,366.100,2551.794,24.541,0.0,0.0,-270.000);
CreateObject(3851,359.822,2551.853,28.547,0.0,0.0,-270.000);
CreateObject(3851,372.352,2551.830,28.377,0.0,0.0,-270.000);
CreateObject(3851,372.335,2529.338,28.611,0.0,0.0,-270.000);
CreateObject(3851,359.778,2529.377,28.673,0.0,0.0,-270.000);
CreateObject(3851,366.112,2551.794,28.474,0.0,0.0,-270.000);
CreateObject(3851,365.786,2529.341,28.633,0.0,0.0,-270.000);
CreateObject(3851,378.000,2546.222,28.481,0.0,0.0,-360.000);
CreateObject(3851,377.915,2535.005,28.548,0.0,0.0,-360.000);
CreateObject(3851,354.088,2534.995,28.653,0.0,0.0,-360.000);
CreateObject(3851,354.163,2546.190,28.624,0.0,0.0,-360.000);
CreateObject(3851,354.088,2534.984,32.609,0.0,0.0,-360.000);
CreateObject(3851,354.088,2534.974,36.532,0.0,0.0,-360.000);
CreateObject(3851,354.163,2546.177,32.617,0.0,0.0,-360.000);
CreateObject(3851,354.163,2546.217,36.565,0.0,0.0,-360.000);
CreateObject(3851,378.000,2546.229,32.448,0.0,0.0,-360.000);
CreateObject(3851,378.000,2546.228,36.397,0.0,0.0,-360.000);
CreateObject(3851,377.915,2535.003,32.520,0.0,0.0,-360.000);
CreateObject(3851,377.915,2534.949,36.488,0.0,0.0,-360.000);
CreateObject(3851,359.790,2551.853,32.492,0.0,0.0,-450.000);
CreateObject(3851,372.345,2551.830,32.342,0.0,0.0,-450.000);
CreateObject(3851,372.312,2529.338,32.600,0.0,0.0,-450.000);
CreateObject(3851,359.754,2529.377,32.620,0.0,0.0,-450.000);
CreateObject(3851,365.810,2529.341,32.532,0.0,0.0,-450.000);
CreateObject(3851,366.131,2551.794,32.473,0.0,0.0,-450.000);
CreateObject(3851,372.349,2551.830,36.312,0.0,0.0,-450.000);
CreateObject(3851,359.769,2551.853,36.443,0.0,0.0,-450.000);
CreateObject(3851,359.738,2529.377,36.567,0.0,0.0,-450.000);
CreateObject(3851,372.293,2529.338,36.548,0.0,0.0,-450.000);
CreateObject(3851,365.816,2529.341,36.473,0.0,0.0,-450.000);
CreateObject(3851,366.089,2551.794,36.423,0.0,0.0,-450.000); // end of glass dm
return 1;
}
And remember to forward your public, on top of your script

Код:
forward Objects(playerid);
i did what you said, it compiled 100% but objects dont respawn...or appear for that matter...
Reply
#4

http://forum.sa-mp.com/index.php?topic=137810.0
Reply
#5

Yeh i forgot that this public has to destroy your objects first and then create them again.
Reply
#6

Quote:
Originally Posted by kamilbam
Yeh i forgot that this public has to destroy your objects first and then create them again.
can you PLEASE make it into an filterscript for me? this is very important and i dont get what you mean.
Reply
#7

Quote:
Originally Posted by **The B055MAN**
Quote:
Originally Posted by kamilbam
Yeh i forgot that this public has to destroy your objects first and then create them again.
can you PLEASE make it into an filterscript for me? this is very important and i dont get what you mean.
PLEASE PLEASE can someone do this for me? i need it by this week.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)