stPatrick

Members
  • Content Count

    383
  • Joined

  • Last visited

  • Days Won

    5

stPatrick last won the day on June 19

stPatrick had the most liked content!

Community Reputation

119 Excellent

About stPatrick

  • Rank
    Street Cat

Details

  • Gang
    SkyTeam

Recent Profile Visitors

1,776 profile views
  1. If fetch was success, the 'error' equals 0. So, 'if (error) then' always true. You need to terminate the function and print the error, if 'error' not equals or greater then 0. Hungarian: A visszakapott error változó mindig vesz fel értéket, ha minden rendben volt, akkor nullát. Mivel 'if (error) then' mindig igaz lesz, ezért minden esetben kilépsz a funckcióból a returnal. Correct: -- SERVER SIDE function newCommand(player, cmd, code) fetchRemote('http://domain.tld/index.php?get&code='..code, function(data, error) if (error ~= 0) then return print(error); end print("Result: " .. data); end); end addCommandHandler('cmd', newCommand);
  2. addCommandHandler getElementPosition getDistanceBetweenPoints3D
  3. stPatrick

    Discord Python

    Maybe an option. https://wiki.multitheftauto.com/wiki/PHP_SDK
  4. Not exactly what you want, but it might help. https://community.multitheftauto.com/index.php?p=resources&s=details&id=2542
  5. stPatrick

    2 Questions

    1: https://wiki.multitheftauto.com/wiki/SetPlayerNametagShowing 2: I don't uderstand.
  6. I think you want to run the code on server side. This is client sided code.
  7. -- SERVER SIDE function onJoin() setPedArmor(source, 100) local playerName = getPlayerName(source) triggerClientEvent(source, "createInfoBox", source, "Sikeresen Bejelentkeztél", "success") end addEventHandler("onPlayerJoin", root, onJoin)
  8. -- SERVER SIDE local adminACLGroupNames = {"Tuladjonos", "Fejlesztő", "SzuperAdmin", "FőAdmin", "Admin5", "Admin4", "Admin3", "Admin2", "Admin1"} local function isAdmin(player) local accName = getAccountName(getPlayerAccount(player)) for _, groupName in ipairs(adminACLGroupNames) do if isObjectInACLGroup("user."..accName, aclGetGroup(groupName)) then return groupName end end return false end addCommandHandler("a", function(player, cmd, ...) local adminGroupName = isAdmin(player) if adminGroupName then local text = table.concat({...}, " ") local name = getPlayerName(player) for _, p in ipairs(getElementsByType("player")) do if isAdmin(p) then outputChatBox("[AdminChat]: "..adminGroupName.." "..name..": "..text, p, 255, 255, 255, true) end end end end) Ez egy baromi csúnya kód, nem is teszteltem, de elméletileg nincs benne hiba.
  9. I don't fully understand what you want, but maybe you're looking for it. https://wiki.multitheftauto.com/wiki/Call
  10. HUNGARIAN A táblázatodban a sorok indexe a player elementje és nem számok, növekvő sorrendben. Ezért ipairs helyett pairs-t kell használnod. Lényegében ezt veheted egy "szabálynak" is, ha saját indexű sorokat használsz, és nem table.insert-el adod hozzá a sorokat a táblázathoz, akkor pairs-t kell használni és jó lesz. ENGLISH Because you use custom indexed array (index is the player's element), you need to use pairs instead of ipairs. for element, value in pairs(Admins) do outputChatBox(getPlayerName(element) .. " is admin!") end
  11. What I sent is working, just crouch and aim.
  12. Try this. Temporary download link
  13. Send the animation, see what I can do.
  14. addEventHandler("onMarkerHit", enBANKN, function(element, mdim) if mdim and getElementType(element) == "player" and not getPedOccupiedVehicle(element) then fadeCamera(element, false, 0.5) setTimer(function() fadeCamera(element, true, 0.5) setElementInterior(element, 5, 1504.953, 156.857, 1804.164) setElementDimension(element, 5) end, 600, 1) end end)
  15. stPatrick

    dbQuery

    You can. function playerLogin(player) -- or smth like that (this is your login function) dbquery ... local mysql_result = dbPoll(...) local name_from_mysql = mysql_result[1].name setElementData(player, "name", name_from_mysql) end outputToChat(" " ..(getElementData(source,"name") or "Unknown").. " say: " ..message, v, 255, 100, 200, true) This is not the exact code, just a sketch.