#define RANDOM_METINS ( 5 )
new Float:RandomCoords[RANDOM_METINS][3] =
{
{0.0,0.0,0.0},
{0.0,0.0,0.0},
{0.0,0.0,0.0},
{0.0,0.0,0.0},
{0.0,0.0,0.0}
};
CreateRandomMetins()
{
new rand;
for(new i = 0; i < RANDOM_METINS; i++)
{
rand = random(RANDOM_METINS);
CreateMetin(RandomCoords[rand][0],RandomCoords[rand][1],RandomCoords[rand][2],0,0);
}
return 1;
}
CreateMetin(Float:X,Float:Y,Float:Z,vw,interior)
{
new id;
if(GetFreeMetinSlot() != -1) id = GetFreeMetinSlot();
else id = Count_Metin;
if(id > MAX_METIN) return SendClientMessage(playerid,-1,\"Nem hozható létre több metin :(\");
Metin_Pos[id][0] = X, Metin_Pos[id][1] = Y, Metin_Pos[id][2] = Z;
Metin_Pos[id][0] += 3.0;
Metin_Object[id] = CreateDynamicObject(METIN_OBJECT,Metin_Pos[id][0],Metin_Pos[id][1],Metin_Pos[id][2],0,0,0