Jump to content

DarkStalker30

Members
  • Posts

    12
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

DarkStalker30's Achievements

Square

Square (6/54)

1

Reputation

  1. LOL REALLY THANKS! I wrote the code at night and just forgot about that, Im stupid Thx for help everyone.
  2. Already did, no any errors but didnt work. Debug is OK, right number in data. On spawn I have script for setting skin from data "player.skin" and it's working correct.
  3. Previous and next codes working good, I'm spawning in dimension 0 on right coords and with normal camera. setElementDimension(client, 0) setElementData(client, "player.isCharCreator", false) setElementData(client, "player.sex", charTable[4]) if charTable[4] then setPedWalkingStyle(client, 118) else setPedWalkingStyle(client, 129) end setElementData(client, "player.skin", charTable[7]) local skin = tonumber(charTable[7]) setElementModel(player, skin) setElementData(client, "player.pame", charTable[8]) setElementData(client, "player.isCharCreator", false) spawnPlayer(client, 233.5927734375, -1278.25, 6.351, -100, 0, 0, 0) fadeCamera(client, true) setCameraTarget(client) From client: triggerServerEvent("endCreate", localPlayer)
  4. setElementData(client, "player.isCharCreator", false)--working good setElementData(client, "player.sex", charTable[4])--working good if charTable[4] then setPedWalkingStyle(client, 118)--working too else setPedWalkingStyle(client, 129)--working too end setElementData(client, "player.skin", charTable[7]) local skin = tonumber(charTable[7]) setElementModel(client, skin)--didn't work
  5. So, I trying to change skin for player after registration. Im using setElementModel(client, skin) but it doesn't work. No errors in console or debugscript; "thePlayer", "root" doing errors. setElementData & setPedWalkingStyle working good. How can I change the skin in this way?
  6. I should have understood it by myself ? Very thx!
  7. It's really working, very thx! But sometimes it's lagging and jetpack is on/off many times in a second. Can I fix it somehow?
  8. So, I have a client-side event: addEventHandler("onClientKey", root, function (button,press) if button == "j" then triggerServerEvent("jetpackClicked", root) end end) And I have server-side code: addEvent("jetpackClicked", true) addEventHandler('jetpackClicked', getRootElement(), function ( root ) setPedWearingJetpack ( root, not isPedWearingJetpack(root) ) end) But it's not working because "root" is not a ped. How can I fix it?
  9. Есть карта Vice City, загружается на сервер с помощью скрипта. Как можно её же запустить в Map Editor? Пробовал Import - ничего не пишет в ответ.
  10. Благодарю, я разобрался, там нужен был другой ресурс (MTA-Stream этого же автора).
  11. Хочу ради интереса запустить карту Vice City. Запускаю этот код: addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),function() for i=550,20000 do removeWorldModel(i,10000,0,0,0) end setOcclusionsEnabled(false) -- Also disable occlusions when removing certain models setWaterLevel(-15000) -- Also hide the default water as it will be full of holes end) Карта Vice City эта: https://github.com/Wolfee-J/MTA-Vice-City В mtaserver.conf <!-- play is the default freeroam gamemode. Remove the following line to prevent it from starting. --> <resource src="play" startup="1" protected="0" /> <resource src="deleteStandartMap" startup="1" protected="0" /> <resource src="VC2" startup="1" protected="0" /> <resource src="VCLightGen" startup="1" protected="0" /> <resource src="VCMini" startup="1" protected="0" /> Итог: Как правильно прописать ресурсы, чтобы всё чётко работало? Когда захожу на сервер, какое-то время висит экран в районе Чилиада и идёт подгрузка, но потом всё равно спавнит на обычной карте.
  12. Суть: хочу получить конкретное значение из ячейки SQl. То есть: таблица формата (id, nick, is_admin, level_admin). is_admin булево значение, хочу получить напрямую его. Как правильно это прописать? А также что конкретно возвращает dbQuery и что делает dbPoll? Основная проблема в том, что я относительно новый человек, и очень плохо разбираюсь в LUA. Совершенно не могу этого понять Два дня уже ищу ответ на вопрос, нахожу для других языков, но не могу. Как сделать дб - знаю, как писать код - знаю, а как правильно соединить ДБ и код - не знаю
×
×
  • Create New...