Jump to content

Mc_Trekkie

Members
  • Posts

    374
  • Joined

  • Last visited

Everything posted by Mc_Trekkie

  1. Ну смотри: Вот у нас 6 картинок, 3 ячейки для них,они выпали рандомно через math.randomили. как узнать сколько из них совпало?
  2. Спасибо,Qwerty,что ответил. Так и знал,что в каком-нибудь "Нубоместе" допущу ошибку. Как? Как сделать с помощью if,then функцию проверки,совпали ли картинки(Хватит не очень большого примера 10-11 строчек).
  3. addEventHandler ("onPlayerDamage", getRootElement(), function( attacker, weapon, bodypart, loss ) local team = getPlayerTeam ( attacker ) if team and (attacker ~= source) and (attacker ~= nil) and (source ~= nil) and (weapon == 3) and (loss > 1) and (getElementType (attacker) == "player") and getTeamName( team ) == 'Police' then Хех,такая простая была ошибка(( Спасиб.
  4. Вот круть,знал бы Я как сотворить такое ( Что правда-то правда
  5. createTeam в другом скрипте дебаг орёт Bad Argument.(GetTeamFromName) На строку номер 6(Тут)
  6. Это ужас какой-то,весь день пытаюсь понять,что там за ошибка.Просто ужас. Обновил предущий пост.
  7. Нет,ничего не исправилось... addEventHandler ("onPlayerDamage", getRootElement(), function( attacker, weapon, bodypart, loss ) local team = getPlayerTeam ( attacker ) if team and (attacker ~= source) and (attacker ~= nil) and (source ~= nil) and (weapon == 3) and (loss > 1) and (getElementType (attacker) == "player") and getTeamFromName( team ) == 'Police' then Вот код,если что.
  8. Нет,понимаешь,Я вот читаю это: http://ilovelua.narod.ru/about_lua.html Всё равно не понимаю,ПОЧЕМУ дебаг орёт? function( attacker, weapon, bodypart, loss ) local team = getPlayerTeam ( attacker )
  9. лол ты прочитал все мануалы, туторилы, всё вики и выучил луа за пол часа ?? Нет,прочитал только "то,что рекомендовано".
  10. Я повторяюсь,но-Я прочёл всё. Возник маленький вопросик: Если Я хочу,чтобы к примеру,объект двигался тогда,когда он достигает каких-либо координат?
  11. Читал несколько раз. Не помогает. Всё сделал. Щас тестить буду.
  12. Ща local team = getPlayerTeam( source ) addEvent( "PoliceTeam",true ) function SetPlayerPolice( ) local level = getPlayerWantedLevel ( source ) if ( level == 0 ) then setPlayerTeam ( source, getTeamFromName( "Police" ) ) else outputChatBox( "Ты разыскиваешься!Отсиди в тюрьме!", source ) end end addEventHandler( "PoliceTeam", root, SetPlayerPolice ) addEventHandler ("onPlayerWasted", getRootElement(), if team and (attacker ~= source) and (attacker ~= nil) and (source ~= nil) and (weapon == 3) and (loss > 1) and (getElementType (attacker) == "player") and getTeamFromName( team ) == 'Police' then --Тут мой код.
  13. У меня не создаётся проверка,в команде ты или нет! if team and (attacker ~= source) and (attacker ~= nil) and (source ~= nil) and (weapon == 3) and (loss > 1) and (getElementType (attacker) == "player") and getTeamFromName( team ) == 'Police' then Переменную team не понимаю как создать! local team = getPlayerTeam( source ) Так рпобывал-не выходит
  14. local team = getPlayerTeam( source ) В самом начале скрипта(3 строка) Пишет BadArgument ...
  15. А он разве таким не является? (:
  16. Просто так: setPlayerNametagText (source, getPlayerName (source).."[COP]") Попробуй так=D
  17. Как поставить проверку на команду? Пробывал по разному... if (attacker ~= source) and (attacker ~= nil) and (source ~= nil) and (weapon == 3) and (loss > 1) and (getElementType (attacker) == "player") then
  18. http://s017.radikal.ru/i428/1202/82/5a0be909f80a.jpg :Trollface:
  19. Да у вас там... Подпольное сообщество скриптеров =D
  20. Спс,Кеникс) Трабл. Пишет дебаг(BadArgument SETPLAYERWANTEDLEVEL(Хотя Я - не менял,а получал ) ) Ещё одна ошибка: attempt to compare number with boolean. Вот код где ругается.: function SetPlayerPolice() local level = getPlayerWantedLevel ( thePlayer ) if ( level > 0 ) then setPlayerTeam (source, getTeamFromName("Police")) else outputChatBox("Ты разыскиваешься!Отсиди в тюрьме!", source) end end addEvent("PoliceTeam",true) addEventHandler("PoliceTeam", root, SetPlayerPolice)
×
×
  • Create New...