Jump to content

Drakath

Members
  • Posts

    768
  • Joined

  • Last visited

Everything posted by Drakath

  1. I get this error: Database query failed: no such column: Drakath local sql = { Query = executeSQLQuery }; sql.Query( "INSERT INTO myTable ( name, ID, city ) VALUES ( "..getAccountName(getPlayerAccount(source))..", "..ID..", "..city.." )" ); How come it recognizes a value as a column?
  2. Thanks, onClientPickupHit worked.
  3. I thought about this at first but is this really the only way? I can swear that I once saw a script that could trigger an event just for elements created by the same resource.
  4. resourceRoot doesn't work.
  5. How can I use onClientPlayerPickupHit event handler only for pickups created by the same resource? I tried: addEventHandler("onClientPlayerPickupHit", resourceRoot, handlePickups) but it doesn't trigger at all.
  6. Pickup appears but when I hit it, it doesn't give me health points.
  7. Peds can't launch projectiles. You have to create them manually using createProjectile()
  8. I wonder why doesn't it work client-side though.
  9. You are both wrong. function asd (t) local x, y, z = getElementPosition(t) createPickup(x+2, y+2, z, 0, 20) end addCommandHandler("mk", asd) Server side script with a working pickup. No event handlers necessary.
  10. Can anyone confirm this? Somehow I find this wrong.
  11. You can use multiple databases too.
  12. I got a small problem. function asd () local x, y, z = getElementPosition(localPlayer) createPickup(x+2, y+2, z, 0, 20) end asd() When I hit this pickup, nothing happens. Why?
  13. Thank you all for helping. It is solved.
  14. What if table[randomIndex][2] can be either nil or true? local isTrue = not table[randomIndex][2] --if true it will convert to false if not isTrue then --if not false = true? Is that how it works?
  15. I do know it's a nil but how can a script check if table[2][2] doesn't exist?
  16. I did try those: if table[2][2] then if table[2][2]~=nil then but in both cases it's: ERROR: attempt to index field '?' (a nil value)
  17. By default, it doesn't have a real-time protection. You need a Premium version for that. Are you using one?
  18. Is there a way to check if a specific index value in a table exists? For example I have two tables: table = {{1,2},{1}} Script selects a random table. How can I check if table[randomTable][2] exists?
  19. Drakath

    Little Help

    for i, team in ipairs(getElementsByType("team")) do local players = getPlayersInTeam (team) local teamName = getTeamName(team) for playerKey, playerValue in ipairs ( players ) do local playerName = getPlayerName(playerValue) local status = isPedDead(playerValue) --draw here end end
  20. What you call an "example" is pretty much asking for a whole script. I doubt anyone will make it for free. If you want basic Lua scripts, look around the wiki.
  21. Drakath

    Houses

    Not exactly what I'm asking. I mean GTA:SA mapped houses in interior 0 (outside). Coordinates for markers at the doorstep of the house.
  22. http://www.lua.org/pil/4.3.4.html http://www.lua.org/manual/5.1/manual.html#pdf-ipairs
×
×
  • Create New...