27.12.2016, 16:09
Код:
func LisaObjekt(playerid)
{
for(new o = 1; o <= MAX_OBJEKTE; o++)
{
if(Objekt[o][Mudel] == 0)
{
Objekt[o][VW] = IG[playerid][PVW];
Objekt[o][Int] = IG[playerid][PINT];
Objekt[o][PositsionX] = IG[playerid][PosX];
Objekt[o][PositsionZ] = IG[playerid][PosY];
Objekt[o][PositsionY] = IG[playerid][PosZ];
Objekt[o][Mudel] = IG[playerid][Mudel];
Objekt[o][PositsionRX] = 0;
Objekt[o][PositsionRY] = 0;
Objekt[o][PositsionRZ] = 0;
Objekt[o][Ob] = CreateDynamicObject(Objekt[o][Mudel], Objekt[o][PositsionX], Objekt[o][PositsionY], Objekt[o][PositsionZ],IG[playerid][PVW],IG[playerid][PINT],100.0);
EditDynamicObject(playerid, Objekt[o][Ob]);
GameTextForPlayer(playerid, "~g~Objekt lisatud", 5000, 1);
return 1;
}
}
return 1;
}

