I try to do a quest for halloween.how can do that with 5 minutes to spawn one of pumpkins?(random)
Код:
CreateObject(19320, 1410.1044, -1305.7026, 9.3780,0,0,0,0,0,0); //
CreateObject(19320, 811.0631, -1098.3042, 25.9063,0,0,0,0,0,0); //
CreateObject(19320, 395.0076, -1892.1541, 7.8301,0,0,0,0,0,0); //
CreateObject(19320, 1208.2128, -1997.4165, 69.0078,0,0,0,0,0,0); //
CreateObject(19320, 1291.9706, -788.6403, 96.4609,0,0,0,0,0,0); //
CreateObject(19320, 1319.6095, 1254.3007, 14.2731,0,0,0,0,0,0); //lv
CreateObject(19320, 2000.8856, 1565.8356, 15.3672,0,0,0,0,0,0); // lv
CreateObject(19320, 2592.7739, 2790.8081, 10.8203,0,0,0,0,0,0); // lv
CreateObject(19320, 1058.6401, 1260.5609, 10.8203,0,0,0,0,0,0); // lv
CreateObject(19320, 1697.7155, 679.0499, 14.8222,0,0,0,0,0,0); // lv
CreateObject(19320, 2206.8350, 1286.4581, 10.8203,0,0,0,0,0,0); // lv
CreateObject(19320, 2060.2539, -2376.2620, 16.1250,0,0,0,0,0,0); //
CreateObject(19320, 2505.8127, -1693.7687, 13.5579,0,0,0,0,0,0); //
CreateObject(19320, 1883.6287, 1990.4550, 7.5946,0,0,0,0,0,0); // lv
PHP код:
stock const Float:pumpkins[][3] = {
{1410.1044, -1305.7026, 9.3780},
{811.0631, -1098.3042, 25.9063},
{395.0076, -1892.1541, 7.8301},
{1208.2128, -1997.4165, 69.0078},
{1291.9706, -788.6403, 96.4609},
{1319.6095, 1254.3007, 14.2731},
{2000.8856, 1565.8356, 15.3672},
{2592.7739, 2790.8081, 10.8203},
{1058.6401, 1260.5609, 10.8203},
{1697.7155, 679.0499, 14.8222},
{2206.8350, 1286.4581, 10.8203},
{2060.2539, -2376.2620, 16.1250},
{2505.8127, -1693.7687, 13.5579},
{1883.6287, 1990.4550, 7.5946}
};
//and then you can spawn them random:
new p = random(sizeof(pumpkins));
CreateObject(19320,pumpkins[p][0],pumpkins[p][1],pumpkins[p][2],0,0,0);