Jump to content

Kenix

Retired Staff
  • Posts

    4,121
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Kenix

  1. Kenix

    Not Invisible

    local tInvisible = { } local tSkins = { [ 217 ] = true; [ 310 ] = true; } function fInvisible ( ) setTimer ( function ( uPlayer ) local nSkin = getElementModel ( uPlayer ) if tSkins[ nSkin ] then tInvisible[ uPlayer ] = not tInvisible[ uPlayer ] setPlayerNametagShowing ( uPlayer, not tInvisible[ uPlayer ] ) setElementAlpha ( uPlayer, not tInvisible[ uPlayer ] and 255 or 0 ) for _,uBlip in pairs( getAttachedElements( uPlayer ) ) do if getElementType( uBlip ) == "blip" then local nR, nG, nB, _ = getBlipColor( uBlip ) setBlipColor( uBlip, nR, nG, nB, not tInvisible[ uPlayer ] and 255 or 0 ) end end end end ,200, 1, source ) end addEventHandler ( "onPlayerSpawn", root, fInvisible )
  2. Проблема решилась. Спасибо.
  3. Когда запускается меню мта, то через 3-5 сек вылетает мта и вот это окно: Эта ошибка только в 1.4 версии.( Раньше не было этой ошибки. Не знаю почему она сейчас .. ) Переустанавливал мта - тоже самое.
  4. Kenix

    Login Register

    You need add your resource to acl admin group.
  5. I know you want "done for you" code, it's not good. You need write yourself. I see you wan't learn.
  6. Ok i create 2 functions. Test it.
  7. function fLabelGetPositionWithTextLength( uLabel, bRelative, sFont, nScale ) if isElement( uLabel ) then local nX, nY = guiGetPosition( uLabel, bRelative ) return nX + dxGetTextWidth( guiGetText( uLabel ), nScale or 1.0, sFont ), nY end return false end It? function fLabelGetPositionWithTextLength( uLabel, bRelative ) if isElement( uLabel ) then local nX, nY = guiGetPosition( uLabel, bRelative ) return nX + guiLabelGetTextExtent( uLabel ), nY end return false end Updated. You mean position label + text length?
  8. You need label text length? Or you mean label x position?
  9. Client addEvent ( 'setOwnedCars', true ) --[[ INFO: uGridList - your grid list nColumn - your column number ]] addEventHandler ( 'setOwnedCars', root, function ( tVehicleList ) if tVehicleList then for _, varVehicleId in pairs ( tVehicleList ) do local nRow = guiGridListAddRow( uGridList ) guiGridListSetItemText ( uGridList, nRow, nColumn, tostring( varVehicleId ), false, false ) end end end ) Server addEvent ( 'triggerToClientOwnerCars', true ) function fGetVehicleIds( uPlayer ) if isElement( uPlayer ) then local uAccountPlayer = getPlayerAccount( uPlayer ) if uAccountPlayer and not isGuestAccount( uAccountPlayer ) then local sAccountName = getAccountName( uAccountPlayer ) return executeSQLQuery ( " SELECT vehicleID FROM vehicles WHERE owner = '" .. sAccountName .. "' " ) end return false end return false end addEventHandler ( 'triggerToClientOwnerCars', root, function ( ) triggerClientEvent( 'setOwnedCars', source, fGetVehicleIds( source ) ) end ) Like this
  10. Не выкладывай код через тег ( пока не будет исправлено ) [ lua ][ /lua ].Используй [ code ][ /code ] ( без пробелов в скобках ) Сделай рефакторинг кода, а то я лично ничего не понял . viewtopic.php?f=141&t=40703
  11. It's wrong code Draken. kimmis9,Can you explain what you want create?
  12. Я так понял тебе нужно это найти строку в таблице? В полезных функциях есть fTableFind. P.S Правдо есть баг с синтаксисом на форуме не забывай. P.S Ох чёрт, когда уже исправят синтаксис на форуме Придётся все функции переписывать ..
  13. executeSQLQuery is server side function.
  14. I write about table.remove. Also i did show you code with my function fTableFind.
  15. Example tSome = { 'some..'; } print( tSome[1] ) --> some.. table.remove( tSome, 1 ) -- remove index 1 in table ( in index 1 we have string 'some..' ) print( tSome[1] ) --> nil
  16. If i am fix, you not learn. And i write your mistake.
  17. All is good.I just show code for test it (output or no). Because in 2 argument you need use NUMBER not STRING.
  18. I congratulate you with this day. I wish you health, happiness and all the best.
  19. С днюхой lil Toady! Желаю всего самого хорошего
  20. Kenix

    Admin Panel

    http://code.google.com/p/mtasa-resources/downloads/list
×
×
  • Create New...