Jump to content

TwiX!

Members
  • Posts

    905
  • Joined

  • Last visited

Everything posted by TwiX!

  1. it's possible make with scripting, other way (like programs - fake)
  2. 50 for scripter 150$ for Nextreme (script owner) (not to infringe copyright)
  3. TwiX!

    Question - Math

    local money = math.random( 20, 40 ) givePlayerMoney( money ) outputChatBox( money ) but remember that
  4. зайди на сервер, залогинься как админ, напиши /debugscript 3 и выложи сюда ошибки
  5. https://community.multitheftauto.com/index.php?p= ... ls&id=6136 nextreme login panel DONE
  6. просто напиши upgrade или upgrade legalsystem
  7. setTimer ( example, 100, 1, source ); function example ( player ) x, y, z = getElementPosition ( player ); end But if you not have source:
  8. TwiX!

    Error

    fix your function where "killnumber" element data set/get/changed for players
  9. This code (my post) is working You need change the IP And read https://wiki.multitheftauto.com/wiki/CallRemote
  10. экстрасенсов здесь нету ошибки в студию
  11. you bought it from me, coz i owner of all wtf scripts. when you bought it?
  12. function CToptimes:doOnServerSentToptimes( data, serverRevision, playerPosition ) outputDebug( 'TOPTIMES', 'CToptimes:doOnServerSentToptimes ' .. tostring(#data) ) -- Calc number lines to use and height of window local numLines = math.clamp( 0, #data, 50 ) self.size.y = 46 + 15 * numLines -- Set height of window local sizeX = self.size.x local sizeY = self.size.y guiSetSize( self.gui['windowbg'], sizeX, sizeY, false ) -- Make listTimes contains the correct number of labels self:updateLabelCount(numLines) -- Update the list items for i=1,numLines do local d = data[i].dateRecorded local timeText = data[i].timeText if timeText:sub(1,1) == '0' then timeText = ' ' .. timeText:sub(2) end local line = string.format( '%d. %s %s %s', i, timeText, data[i].playerName, d ) guiSetText ( self.gui['listTimes'][i], line ) if i == playerPosition then guiLabelSetColor ( self.gui['listTimes'][i], 0, 255, 255 ) else guiLabelSetColor ( self.gui['listTimes'][i], 255, 255, 255 ) end end -- Debug if _DEBUG_CHECK then outputDebug( 'TOPTIMES', 'toptimes', string.format('crev:%s srev:%s', tostring(self.clientRevision), tostring(serverRevision) ) ) if self.clientRevision == serverRevision then outputDebug( 'TOPTIMES', 'Already have this revision' ) end end -- Update status self.clientRevision = serverRevision self.listStatus = 'Full' self:updateShow() end
  13. TwiX!

    data

    account data in registry.db
  14. search in toptimes_client.lua function CToptimes:doOnServerSentToptimes( data, serverRevision, playerPosition ) and use local yourLines = 10 for i=1,yourLines do outputChatBox ( data[i].dateRecorded ); end Change outputChatBox on dxDrawText or guiSetText
  15. TwiX!

    guiGetVisible

    musicwindow = guiCreateWindow(0, 0, 461, 336, "Music Player", false) checkbox1 = guiCreateCheckBox(190, 285, 91, 31, "Enable Replay", false) edit1 = guiCreateEdit(20, 75, 421, 21, "", false) guiEditSetMaxLength(edit1, 32767) label2 = guiCreateLabel(20, 55, 141, 16, "Insert your Music Link here:", false) guiLabelSetHorizontalAlign(label2, "left", false) guiLabelSetVerticalAlign(label2, "center") label1 = guiCreateLabel(170, 25, 81, 16, "CIT Music Player", false) guiLabelSetHorizontalAlign(label1, "left", false) guiLabelSetVerticalAlign(label1, "center") gridlist1 = guiCreateGridList(20, 145, 421, 121} button1 = guiCreateButton(20, 105, 81, 31, "Add To Playlist", false) button2 = guiCreateButton(70, 285, 51, 31, "Play", false) button3 = guiCreateButton(130, 285, 51, 31, "Stop", false) button4 = guiCreateButton(280, 285, 41, 31, "-", false) button5 = guiCreateButton(330, 285, 41, 31, "+", false) function guiToggleVisible ( ) if ( guiGetVisible ( musicwindow ) ) then guiSetVisible ( musicwindow, false ) else guiSetVisible ( musicwindow, true ) end end bindKey ( "F10", "down", guiToggleVisible )
  16. function CreateTable ( ) guiCreateWindow ( 25, 30, 30, 30, PedShop, false ) ButItem = guiCreateButton( 25, 25, 25, 25, "Buy It!", false ) ---\\\При старте ресурса,есть кнопка и окно,но оно не открываеться(биндим потом кнопку или добавляем команду) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), CreateTable ) function ActiveButton ( ) if ( source == ButItem ) then -- Делай здесь чё хочешь end end addEventHandler ( "OnClientGUIClick", getResourceRootElement( getThisResource( ) ), ActiveButton ) можно сделать евент только на 1 кнопку addEventHandler ( "OnClientGUIClick", ButItem, ActiveButton ) Повторяю.. что все есть на вики https://wiki.multitheftauto.com/wiki/OnClientGUIClick Посети лучше вот эту тему viewtopic.php?f=141&t=32458
  17. Connect Информация Обновить Список как искать (по нику или по серверу) Заставка мташная Поиск вроде другой
  18. Всё там хорошо Не понял суть вопроса. С помощью https://wiki.multitheftauto.com/wiki/TriggerClientEvent и https://wiki.multitheftauto.com/wiki/TriggerServerEvent Естественно сработает сначала StartThisTutorial а потом AddAddonsInThisResource т.к ты расположил их в таком порядке getResourceRootElement(getThisResource()) ещё раз говорю что это сделано для того чтобы в onResourceStart евент работал только когда ТВОЙ ресурс начнёт работу можешь проверить так: function StartThisTuturial ( ) outputChatBox ( ' Этот текст будет работать при старте только #ff0000ТВОЕГО #ffffffресурса ' , root, 255, 255, 255, true ); end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource ( ) ), StartThisTuturial ) и тоже самое только с function anotherStart ( ) outputChatBox ( ' Теперь выводится текст при старте #ff0000ЛЮБОГО #ffffffресурса ' , root, 255, 255, 255, true ); end addEventHandler ( "onResourceStart", root, anotherStart ) [b]root[/b] определён как [b]getRootElement ( )[/b] засунь его в отдельную папку там myResource стартани его, ты увидишь 2 сообщения, потом перезагрузи любой работающий скрипт. и ты увидишь 2-е сообщение
  19. TwiX!

    [TUT]Triggering

    hm function startTrigger ( player, _, text ) if not tonumber ( text ) then return end if tonumber ( text ) == 1 then triggerClientEvent ( root, "outputMsg", player, 1 ); elseif tonumber ( text ) == 2 then triggerClientEvent ( player, "outputMsg", player, 1 ); elseif tonumber ( text ) == 3 then triggerClientEvent ( player, "outputMsg", root, 1 ); end end addCommandHandler ( "msg", startTrigger ) function outputText ( tMsg ) if tMsg == 1 then outputChatBox ( "Hello, this Event will work for all players, but player who used this command is " .. getPlayerName ( source ), root, 255, 255, 255, true ); outputChatBox ( "We can send message only for the player", source, 255, 255, 255, true ); elseif tMsg == 2 then outputChatBox ( "Hello, this Event will work only for player who were used this cmd / you are ", .. getPlayerName ( source ), source, 255, 255, 255, true ); outputChatBox ( "Ofc this msg can see all players too / but our player is " .. getPlayerName ( source ), root, 255, 255, 255, true ); else outputChatBox ( "Hello, this Event will work only for player ( who used this cmd ) but source is root element ( getRootElement ( ) ) ", source, 255, 255, 255, true ); outputChatBox ( "Now we not have player ( Who used this command ), but this message can see all players ", source, 255, 255, 255, true ); end end addEvent( "outputMsg", true ) addEventHandler( "outputMsg", root, outputText ) correct me if i'm wrong and wiki said https://wiki.multitheftauto.com/wiki/TriggerClientEvent so you can use triggerClientEvent ( "outputMsg", player, 1 );
  20. да зайди на https://wiki.multitheftauto.com/wiki/Main_Page и посмотри слева всё написано
  21. обычное нарушение авторский прав, он только изменил картинок 6
  22. поменяй свою ГТА мта здесь не причём
  23. во 1 getRandomPlayer работает только на серверной стороне, onClientPlayerJoin евент работает только на клиенте. во 2 setPedArmor ( thePlayer, 100 ) От куда ты взял ThePlayer? В 3 , проще сделать всё в 1 евенте onPlayerLogin Код function TeamsCreate () GuestJoin = createTeam ( "Guest", 0, 255, 0 ) PlayersJoin = createTeam ( "Players", 120, 120, 0 ) AdminsJoin = createTeam ( "Admins", 120, 120, 0 ) OwnerJoin = createTeam ( "Owner", 230, 0, 59 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource ( ) ), TeamsCreate ) function jPlayers ( ) if ( isGuestAccount ( getPlayerAccount ( source ) ) ) then setPlayerTeam ( source, GuestJoin ); end end addEventHandler ( "onPlayerJoin", getRootElement(), jPlayers ) function PlayersPlay () if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Everyone" ) ) then setPlayerTeam(source, PlayersJoin) elseif isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Admin" ) ) then setPlayerTeam ( source, AdminsJoin ); setPedArmor ( source, 100 ); elseif isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Supermoderator" ) ) then setPlayerTeam ( source, OwnerJoin ); setPedArmor ( source, 100 ); end end addEventHandler ( "onPlayerLogin", getRootElement(), PlayersPlay ) getResourceRootElement ( getThisResource ( ) ) Нужно для того чтобы срабатывал евент onResoureStart Только твой ресурс, а не когда любой другой ресурс будет работать. onPlayerJoin Евент нужен для того чтобы проверять вошедшего игрока, в принципе проверка там не нужна, так как у него акка естественно не будет, можно просто сразу ему ставить "Guest" Команду
×
×
  • Create New...