So I have a pumpkin spawneaza sistem.Un every ten minute.Cum can do when a pumpkin spawneaza administrators to send a message " Pumpkin area was displayed xyz "
Код:
new 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}
};
Код:
forward pumpkinTimer();
public pumpkinTimer()
{
if(tmp_obj) DestroyObject(tmp_obj);
new p = random(sizeof(pumpkins));
tmp_obj = CreateObject(19320,pumpkins[p][0],pumpkins[p][1],pumpkins[p][2],0,0,0);
return 1;
}
PHP код:
forward pumpkinTimer();
public pumpkinTimer()
{
new string [128];
if(tmp_obj) DestroyObject(tmp_obj);
new p = random(sizeof(pumpkins));
tmp_obj = CreateObject(19320,pumpkins[p][0],pumpkins[p][1],pumpkins[p][2],0,0,0);
format (string,sizeof ( string ), " a pumpkin was spawned in next coordonate: %f and %f ",pumpkins[p][0],pumpkins[p][1]);
SendClientMessageToAll (-1,string);
return 1;
}