-
Posts
748 -
Joined
-
Last visited
Everything posted by AMARANT
-
local jobMarker = {} local jobs = { {"Police Officer",1547.06470, -1681.80249, 13.55873, 0, 100, 255}, {"Paramedic",1178.41431, -1328.58850, 14.11890, 0, 255, 255} } for i=1,#jobs do jobMarker[i] = createMarker(jobs[i][2], jobs[i][3], jobs[i][4], "cylinder", 1.5, jobs[i][5], jobs[i][6], jobs[i][7]) addEventHandler("onClientMarkerHit",jobMarker[i],myFunction) end function myFunction() --CODE HERE end
-
That means that your event "startTheCountDown" is not added client-side with this function: addEvent("startTheCountDown",true)
-
People don't like helping with someone else's scripts. Find an author of the script and ask him or just create your own code.
-
Don't use negative values for radar areas.
-
Посмотри ссылку Кеникса там максимум вариантов для начала представлено и описано.
-
Ну так чудес же не бывает. Как можно создать сервер не захотев учить lua? Ну это же нонсенс... Мой тебе совет, если сильно хочешь сервер начинай с обыных туториалов, а потом задавай конкретные вопросы на форуме что тебе не понятно. Это стандартный метод для любого newcomer'a.
-
Так какой смысл скриптить если тебе скучно даже понять этот язык?
-
простите за тупость роскажите по подробней что это? debugscript 3 в консоли включает режим дебага, который отображает все ошибки в скрипте.
-
local posX, posY, posZ = 1279.6999511719, 304.5, 19.60000038147; addEventHandler("onClientPlayerDamage", localPlayer, function (attacker, weapon) if (attacker and source ~= attacker) then if (getElementType ( attacker ) == "player" ) then if weapon == 23 then setElementPosition ( source, posX, posY, posZ ) -- Телепортировать надо source, а не localPlayer end end end end ) Телепорт вообще лучше на серверной части делать.
-
Разъясни механику твоего оружия-телепорта.
-
* NEED TO BE DELETED
-
Я думал сервера делают чтоб люди на них играли, но это видимо не про твое творение... Ну да ладно дело твое. Некоторым совсем не слабо сделать свой ориганальный мод, поэтому сейчас эти люди и заняты своими проектами, просто не открывают их пока все не будет готово. Короче че спорить, просто я остаюсь при своем мнении, что создавать серваки на основе паблик модов и ресурсов абсолютно бессмысленно.
-
Да блин это ж просто проверка обыкновенная. Используй setElementData и getElementData чтобы проверять это все или если хочешь для команды то делай как тебе уже выше поясняли неоднократно.
-
Так и не увидишь, таких тут большинство. Взял перевел мод и думаешь что соберешь толпы народу? Что-то я не видел "огромное количество русскоязычных игроков" жаждущих поиграть на моде, количество клонов которого в МТА на всех пальцах не пересчитать.
-
vG что русское, что нерусское - один хрен. От этого мода уже тошнит всех. Лучше б что-то новое создавал.
-
I don't understand what are you trying to do? If you want to draw DX text just do it in a less complex way.
-
It starts showing the image when the resource starts or after at least one click on button?
-
Да сделай проверку просто: if getPlayerTeam(source)==getTeamFromName("Ghosts") then -- Если тело в команде Ghosts то... --То-то и то-то end
-
I'm not good at explaining the lua basics. For that you can find more with google or tutorials on MTA wiki. And I made an example above for lolek123. But here is one more: function outputForPerfect(player) for i,player in ipairs(getElementsByType("player") do -- Here's looping through all player elements in order to find what we want. Loops are usually used to check tables or to shorten a code so you can write several lines of your script instead of writing hundred. if getPlayerName(player)=="Perfect" then -- We wanted to find a player with nickname "Perfect". Here we are outputChatBox("Bla-bla-bla...",player,0,255,0) -- And finally we output a message to him. end end end addCommandHandler ( "loop", outputForPerfect )
-
The 4th "end" is loop actually.
-
Because every "if", loop or function must be closed with "end" operator. Install Notepad++ it can help you to figure this out.
-
This will work after your resource starts. Server-side: function CheckMyObject(res) if res==getThisResource() then for _,object in ipairs(getElementsByType("object")) do if getElementModel(object)==2916 then local x,y,z=getElementPosition(object) local int=getElementInterior(object) local dim=getElementDimension(object) myMarker=createMarker(x,y,z,"cylinder",2.0,255,0,0,125) setElementInterior(myMarker,int) setElementDimension(myMarker,dim) end end end end addEventHandler("onResourceStart",getRootElement(),CheckMyObject)
-
What do you mean? Checking an object that hits marker or what?
-
Check with this: outputChatBox(tostring(getElementData(source, "databaseid")))