Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


ShayF2 last won the day on January 11 2018

ShayF2 had the most liked content!

Community Reputation

53 Popular


About ShayF2

  • Rank


  • Gang
  • Location
    Grove St
  • Occupation
  • Interests

Recent Profile Visitors

2,202 profile views
  1. ShayF2

    MTA Offline Wiki

    should i continue on this?
  2. local _output = outputChatBox function outputChatBox(text, ...) if string.find(text, 'color:#') then string.gsub(text, 'color:', '') end return _output(text, unpack(arg)) end
  3. You have to use relative positioning on everything you draw.
  4. Use absolute positioning (your resolution whole numbers) then calculate the relative position with this local devx, devy = 1366, 768 -- your resolution local clientx, clienty = guiGetScreenSize() -- everyone's resolution function absoluteToRelativeDX(x, y, w, h) return x/devx*clientx, y/devy*clienty, w/devx*clientx, h/devy*clienty end Hopefully this helps you.
  5. ShayF2

    Who am I?

    @IIYAMA you got it boss.
  6. ShayF2

    Who am I?

    Who am I? Anyone can respond. Be honest, I wont argue.
  7. I think you first need to learn what table index's and table keys are, @MissionComp. Table index's are the positions inside the table, and using such index can allow you to grab things from a specific spot in the table. Index's go up from 0, and they go to like an infinite amount. Say you have a table: local t = {} Now lets put something in the table: table.insert(t, 'Hello World') Okay so we've put a string that says Hello World into the table. Now the table looks like this, without you having to recreate it again: t = {'Hello World'} So now that we have a value in
  8. -- this is for individual objects if u want to count only the ones u create local objects = {} local _obj = createObject Object = createObject function createObject(...) local obj = _obj(...) objects[#objects+1] = obj return obj end -- then you would use index's on objects table like before if objects[1] then print(getElementPosition(objects[1])) end -- this is for if you want to grab all objects local objects = getElementsByType('object') -- then use index's like I said before if objects[1] then print(getElementPosition(objects[1])) end
  9. line 93 is just killTimer, replace this with if isTimer(timerVehicle) then killTimer(timerVehicle) end
  10. Bad TXD ? Vertex's may not be lined up correctly, textures could be missing, textures could be overlapping, idk. I'm not so big into modeling lol.
  11. If you're running this clientside then oyuncu doesn't exist. Try running it serverside.
  12. function TST(player, command, accountName) assert(type(accountName) == 'string', 'Expected string @ TST:accountName, got "'..type(accountName)..'"') local account = getAccount(accountName) assert(account, 'Unable to get account @ TST:account, got "'..type(account)..'"') local player = getAccountPlayer(account) assert(player, 'Unable to get player from account @ TST:account, got "'..type(player)..'"') if player then Try this for debugging
  13. local players = getElementsByType('player') local vehicles = getElementsByType('vehicle') -- then just use index's, like this if player[1] then -- 1, 2, 3, 4, 5 etc inside of [], this number will be your index or your 'id' outputChatBox(getPlayerName(player[1])) end
  14. ShayF2

    pairs vs ipairs

    When you run a loop in pairs, it grabs not only indexed items but also objects. Objects have keys and values. for k, v in pairs(table) do in this case k would be your key, and v would be its value. Keys are always strings. Say it's not an object, instead its an indexed item, k would become the index, and v would be the value for that index. ipairs however, loops through ONLY indexed items and it does them in order. So ipairs will not grab objects. pairs is faster than ipairs since it does not have to sort through the table first. for i=1, #table do this is called an Int loop, w
  • Create New...