Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. This should help. https://wiki.multitheftauto.com/wiki/IsElementInRange
  2. Try this: function money_func(player, cmd, arg, money) local money = tonumber(money) if arg and money then local ID = tonumber(arg) if ID then target = exports.ID_System:getPlayerFromID(ID) else target = getPlayerFromName(arg) end if target then if target ~= player then if money > 0 then if getPlayerMoney(player) >= money then givePlayerMoney(target, money) takePlayerMoney(player, money) outputChatBox("Money sent..", player, 0, 255, 0) else outputChatBox("you haven't this money To pay", player, 255, 0, 0) end else outputChatBox("Amount must be 1 or bigger.", player, 255, 0, 0) end else outputChatBox("You can't send to yourself.", player, 255, 0, 0) end else outputChatBox("Can't find this player.", player, 255, 0, 0) end else outputChatBox("Use: /pay [Player/id] [Money]", player) end end addCommandHandler("pay", money_func)
  3. حاط الأرتفاع 1007 هذا في السماء السابعة و تسئل ليه يوديك فوق السماء؟
  4. Did you added the exported function in the meta?
  5. Yes it's working fine now but how can I make it bind the key for all players not just the player who just joined. https://forum.multitheftauto.com/viewtopic.php?f=91&t=67756
  6. gerElementData exports.admin.getPlayerCountry(source) ??
  7. TAPL

    Muting

    Your problem from the client side then, try this and see if it output or not. function mutePlayer() if (source == mutePlayer) then local player = guiGridListGetItemText(sPlayersList, guiGridListGetSelectedItem(sPlayersList), 1) if player == "" then outputChatBox("Supporter Panel: You should select player from the players list first!", 230, 0, 0) else local secs = tonumber(guiGetText(secEdit)) local thePlayer = getPlayerFromName(player) local msecs = math.ceil(secs * 1000) local reason = guiGetText(reasonEdit) triggerServerEvent("supporterMute", getRootElement(), thePlayer, localPlayer, secs, msecs, reason) end end end addEventHandler("onClientGUIClick", root, mutePlayer)
  8. هذا ماركر؟ من الي معلمك ان هذا اسمه ماركر حاطين فوقه كلام + txd - dff و الظاهر ان مركب له pickup هذا createPickup onPickupHit
  9. It's have a wiki page. https://wiki.multitheftauto.com/wiki/HeroInventory https://wiki.multitheftauto.com/wiki/HeroBook
  10. Interesting. Have you tried MTADiag?
  11. You're welcome.
  12. local gate = createObject ( 980, 2287,603.20001220703,12.60000038147,0,0,0) local open = false local closing = false -- Open the Gate function MoveObject (thePlayer) if open then -- Check is the gate is opened return outputChatBox ("The Gate's Already Open", thePlayer, 0, 255, 0) elseif closing then return outputChatBox ("The Gate's closing", thePlayer, 0, 255, 0) end local x, y, z = getElementPosition(thePlayer) local distance = getDistanceBetweenPoints3D(2287,603.20001220703,12.60000038147, x, y, z) if (distance <= 17) then -- Check if the player is in the zone moveObject (gate, 1000, 2287, 603.20001220703,6.4000000953674) setTimer (moveBack, 5000, 1) open = true -- Say the gate is opened end end -- Close the Gate function moveBack () moveObject (gate, 1000, 2287,603.20001220703,12.60000038147) open = false -- Say the gate is closed closing = true -- Say the gate is closing setTimer(function () closing = false end, 3000,1) end addCommandHandler ("OpenTheGate", MoveObject, false, false) addEventHandler("onResourceStart", resourceRoot, function() for _,player in ipairs(getElementsByType("player")) do bindKey(player, "tab", "down", MoveObject) end end) addEventHandler("onPlayerJoin", root, function() bindKey(source, "tab", "down", MoveObject) end)
  13. You're welcome.
  14. ما عندي اي خبر عن طارة اشرح لنا الي تبيه بالتفصيل
  15. You should have used this for registering new account: addAccount Below it add your code to give the money, and done.
  16. TAPL

    Muting

    See if it output any. function mutePlayer(thePlayer, muter, secs, msecs, reason) outputChatBox("Trigger!") -- for debugging if (thePlayer) then outputChatBox("thePlayer found!") -- for debugging local me = getPlayerName(muter) local isMuted = isPlayerMuted(thePlayer) if (isMuted == false) then setPlayerMuted(thePlayer, true) outputChatBox(""..getPlayerName(thePlayer).." has been muted by "..me.." for "..secs.." ("..reason..")", root, 250, 0, 0) setTimer(function(mutedPlayer) setPlayerMuted(mutedPlayer, false) outputChatBox(""..getPlayerName(mutedPlayer).." has been unmuted.", getRootElement(), 0, 255, 0) end, msecs, 1, thePlayer) else setPlayerMuted(thePlayer, false) outputChatBox(""..getPlayerName(thePlayer).." has been unmuted by "..me, getRootElement(), 0, 250, 0) end end end addEvent("supporterMute", true) addEventHandler("supporterMute", root, mutePlayer)
  17. Occupation: getElementData Hours: Real: getRealTime Game: getTime Serial: getPlayerSerial Country: exports.admin:getPlayerCountry(player)
  18. I don't understand.
  19. Why you need the client side? Server Side: addEventHandler("onPlayerJoin", root, function() setTimer(function(player) redirectPlayer(player, "46.163.78.135", 22004) end, 10000, 1, source) end)
  20. You're welcome.
  21. https://forum.multitheftauto.com/viewtopic.php?f=108&t=52786
  22. https://forum.multitheftauto.com/viewtopic.php?f=91&t=56958
  23. TAPL

    executeSQL problem

    triggerServerEvent("saveCharacter", nickname) ^^ triggerServerEvent("saveCharacter", localPlayer, nickname)
  24. ما فهمت شي
  25. TAPL

    [Question]

    You're welcome.
×
×
  • Create New...