Jump to content

AMARANT

Members
  • Posts

    748
  • Joined

  • Last visited

Everything posted by AMARANT

  1. How can I check that in my table in "nickname" column a row "AMARANT" already exists? I mean blocking possibility to add the same names to it.
  2. Thanks man, I didn't know that it's there
  3. I want to learn more how to use SQL database within MTA. So I tried to create one when my resource starts. I used this: function createSQLOnStart (res) if res==getThisResource() then executeSQLCreateTable ( "mostwanted", "nickname TEXT, reward NUMBER, desc TEXT" ) end end addEventHandler ( "onResourceStart", getRootElement(),createSQLOnStart ) In the console it says "Creating new DB table mostwanted" so I figured that I did it right. But where that database is located on the server? Where can I see it like I do with 'internal.db'?
  4. Resource name is "login". But if you're saying that I do it right then why it isn't still working?
  5. Is this wrong adding? <group name="Admin"> <acl name="Moderator"></acl> <acl name="SuperModerator"></acl> <acl name="Admin"></acl> <acl name="RPC"></acl> <object name="resource.admin"></object> <object name="resource.webadmin"></object> <object name="resource.driver"></object> <object name="resource.farmer"></object> [color=#FF0000]<object name="resource.login"></object>[/color] <object name="user.AMARANT"></object> </group>
  6. I tried to make anti-logout function that blocks /logout command and kicks the player from the server but it always shows a warning in the console "Access denied @ 'kickPlayer'". How come does it happen if in acl.xml I added my resource to Admin group? Here's that very function: function onLogout () kickPlayer ( source, nil, "Logging out is disallowed!" ) cancelEvent() end addEventHandler ("onPlayerLogout", getRootElement(), onLogout)
  7. Не знаю, но мне кажется что объединяться дальше этого форума не имеет никакого смысла, по крайней мере пока. Тут и так-то народу раз-два и обчелся, а вы хотите еще какие-то сообщества создавать. Кому это может быть интересно, так это только новичкам в МТА, которые просто хотят чтобы кто-то их научил lua-скриптингу, хотя по сути одной MTA-wiki более, чем достаточно + помощь форумчан никто не отменял. По поводу RP серваков, люди просто заняты своими собственными проектами, т.к. тот кто умеет скриптить не нуждается особо в чей-либо помощи со стороны. Каждый хочет создать что-то свое уникальное, но в итоге из-за большинства людей которые не играют, а создают свои серваки мы до сих пор так и не увидели нормального РП-серва. В общем, короче говоря, что я хотел этим сказать, так это то что народу заинтересованном в МТА чертовски мало на сегодняшний день, поэтому идея про сообщество, на мой взгляд, провальна.
  8. It's very sad I suppose that it will happen even if I do it client-side, won't it?
  9. Of course, I checked that all because this simple code is a part of the huge police system script. And it works with about 90% chance just like TAPL said. The problem is that why doesn't it work with 100% chance and why doesn't it work when a source is moving?
  10. Hello there. I wanted to make something like a stun when you hit player with a cop nightstick. But I came across a very annoying bug. The event "onPlayerDamage" doesn't work correctly. I just made a check that you use the nightstick and a debug message showing that the event triggered. But it doesn't always work and while a source is on the run it won't trigger at all! I provided my simple script and hope you can help me with this issue. function NightstickStun ( attacker, weapon, bodypart, loss ) if ( weapon == 3 ) then outputChatBox("HIT!",getRootElement(),0,255,255) end end addEventHandler ( "onPlayerDamage", getRootElement (), NightstickStun )
  11. Даже не знаю куда написать. Хотел немножко изменить стандартный HUD уровня розыска, но нигде не могу найти или выдрать иконки этих звездочек. Может кто может помочь, извините конечно если немножко не по теме
  12. So as of today there is no way I can check it, can I?
  13. Unfortunately, the same thing
  14. Is there any way to check if an object hits a marker? Because the code below doesn't work. myMarker = createMarker(2228.75,-2240.57,14.29,"cylinder",2.0,255,0,0,125) addEventHandler( "onMarkerHit",myMarker, function( hitElement,matchingDimension ) if getElementType( hitElement ) == "object" then outputChatBox( "Object hit marker" ) end end )
  15. And what about restoring objects back? I deleted some unnecessary objects from the map but did it in a wrong way. And now when I try to restore them function restoreWorldModel doesn't work correctly. It restores those objects only when I restart a resource and stand near them. But when I quit the game and log in back to see what happens there are no my objects at all. They are all gone and I don't know how to restore them back! Help me please!
  16. When I try to remove a chair from a burgershot with this function it removes a bunch of chairs instead of only one. I set 0.5 radius to delete the necessary chair but it didn't work. Is there any minimum radius for this function or something?
  17. _Vincent_х, благодарю то что надо. Я почему-то думал что с ACL.xml это будет связано)
  18. Автор темы спросил "Можно ли вообще так сделать", а не "Пацаны а прикольно б было сделать другой интерфейс всем игрокам на серве?". На первый вопрос ответ уже дали, а на второй можете не утруждаться ответами.
  19. А как можно запретить игрокам на сервере использовать команды "login", "logout" и например смену ника?
  20. Имелось ввиду настройки по умолчанию, а не вечный стиль сервера. Кому не понравилось бы поменял.
  21. Ну как бы сцылко твоя мне нового ничего не открыла, т.к. я не имею ни малейшего понятия как вообще это сделать, что туда записывать в xml. Если б небольшой примерчик или немного конкретики по поводу моего случая, то, дружище, я был бы очень признателен.
  22. Ребят, как скриптово реализовать на сервере автосохранение паролей в окне логина, например когда установлен специальный флажок? Видел такое на многих серверах, а сам не знаю как сделать.
  23. Сделаю если что, а пока в принципе не так существенно, просто думал если можно, то сделать. В общем, спасибо за ответы)
  24. Изменять шрифт и размер символов в стандартном чате для сервера так, чтобы как я уже говорил он был такой у всех.
  25. Можно ли сделать интерфейс чата сервера по умолчанию с необходимыми настройками? Чтобы эти настройки были по умолчанию у каждого игрока на сервере?
×
×
  • Create New...