Need help?
Create a topic in the appropriate section
Don't write everything in the chat!Take a look at the marketplace
There you can buy
everything related to game serversDon't want a ban?
Please read our rules
Don't disturb the order!Sell or buy?
Use services of the guarantor
We will make your deal safe



- 0
-
Our picks
Всем привет. Сразу скажу чтобы прояснить ситуацию, я новичок и ничего в скриптах не понимаю, но умею вникать в тему если меня кто-то направит. Я смогу выбрать точки спавна любых предметов (в моем случае ящиков) и расставить их по карте, но (дальше то, что не понимаю как сделать) суть в том что в них должен быть определенный лут. Спавнить ящики я собираюсь через простой серверный мод с помощью SpawnObject( ); . Вот код того мода-спавнера:
ref MyBuildingsClass g_MyBuildingsClass = new MyBuildingsClass; class MyBuildingsClass { void MyBuildingsClass() { init() delete g_MyBuildingsClass; } void init() { // Начало SpawnObject( "PPW_TrashCan", "4539.790039 71.363197 1815.689941", "163.999985 0.000000 -0.000000" ); //Конец } void SpawnObject(string objectName, vector position, vector orientation) { Object obj; obj = Object.Cast(GetGame().CreateObject(objectName, "1 500 1")); obj.SetPosition(position); obj.SetOrientation(orientation); if (obj.CanAffectPathgraph()) { obj.SetAffectPathgraph(true, false); GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GetGame().UpdatePathgraphRegionByObject, 100, false, obj); } else { orientation = obj.GetOrientation(); orientation[0] = orientation[0] + 1; obj.SetOrientation(orientation); orientation[0] = orientation[0] - 1; obj.SetOrientation(orientation); orientation[1] = orientation[1] + 1; obj.SetOrientation(orientation); orientation[1] = orientation[1] - 1; obj.SetOrientation(orientation); orientation[2] = orientation[2] + 1; obj.SetOrientation(orientation); orientation[2] = orientation[2] - 1; obj.SetOrientation(orientation); } } }
вставка кода файла в спец. тег для его вставки (see edit history)
Share this post
Link to post
Share on other sites