Jump to content


  • Posts

  • Joined

  • Last visited


About Keiichi1

  • Birthday 12/01/2004


  • Location
  • Occupation
  • Interests

Recent Profile Visitors

1,056 profile views

Keiichi1's Achievements


Rat (9/54)



  1. You can't set the player's money over that value. Use ElementData. Code (server): -- When this script starts set every players' 'money' elementdata to 0, if they haven't got one already. for _, player in ipairs(getElementsByType("player")) do if not getElementData(player, "money") then setElementData(player, "money", 0) end end -- When a player joins set the 'money' elementdata to 0. addEventHandler("onPlayerJoin", getRootElement(), function() setElementData(source, "money", 0) end) addCommandHandler("givemoney", function(thePlayer, cmd, targetName, amount) if targetName and tonumber(amount) then local target = getPlayerFromName(targetName) if target then setElementData(target, "money", getElementData(target, "money") + tonumber(amount)) outputChatBox("You gave $"..amount.." to "..targetName.."!", thePlayer, 0, 200, 0) outputChatBox("You got $"..amount.."!", target, 0, 200, 0) else outputChatBox("Player not found.", thePlayer, 255, 0, 0) end else outputChatBox("Usage: /givemoney [playername] [amount]", thePlayer, 255, 255, 255) end end)
  2. You can't animate objects. Use moveObject
  3. I think it's because you're using setPedControlState to set the control state to walk. I got the same issue, then i turned that resource off and it works perfectly.
  4. I think it is not possible in MTA, but wait for someone elses' answer.
  5. You can change some object properties using ColEditor 2. Try it.
  6. Replace the default objects with custom ones. This is the only method, you can't add more objects. https://wiki.multitheftauto.com/wiki/EngineLoadDFF Example 4.
  7. MTA isn't have built-in elementdata save, you have to do it manually. I recommend mysql. dbConnect dbExec dbQuery onPlayerQuit And when the player joins you have to set those element datas with the result you get with query.
  8. Set a random interval timer. setTimer math.random
  9. if isObjectInACLGroup("user."..Deadusergroup, aclGetGroup("Polis")) or isObjectInACLGroup("user."..Deadusergroup, aclGetGroup("someGroup")) then
  10. Set the vehicle variable to the vehicles tables' i index, which should be a number. It can be done easier. for i, vehicle in ipairs(getElementsByType("vehicle")) do setElementPosition(vehicle, 0, 0, 10) -- position setElementRotation(vehicle, 90, 180, 0, "ZYX") -- orientation/rotation end
  11. You won't get help with this attitude, trust me. Start learning...
  12. What's your problem? @IIYAMA wants you to learn, not to beg everytime for scripts. You need to understand first how lua works and then you can go with the MTA:SA functions, events.
  13. Server for k, v in ipairs(getElementsByType("vehicle")) do setVehicleDamageProof(v, true) end addEventHandler("onVehicleExit", getRootElement(), function() setVehicleDamageProof(source, true) end) addEventHandler("onVehicleEnter", getRootElement(), function() setVehicleDamageProof(source, false) end)
  14. There's no marker element in your code.
  • Create New...