Keiichi1

Members
  • Content Count

    39
  • Joined

  • Last visited

Community Reputation

9 Neutral

2 Followers

About Keiichi1

  • Rank
    Rat
  • Birthday 12/01/2004

Details

  • Location
    Serbia
  • Occupation
    Mouse
  • Interests
    Nothing

Recent Profile Visitors

695 profile views
  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. onClientKey setPedControlState
  3. You can't animate objects. Use moveObject
  4. 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.
  5. I think it is not possible in MTA, but wait for someone elses' answer.
  6. You can change some object properties using ColEditor 2. Try it.
  7. 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.
  8. 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.
  9. Set a random interval timer. setTimer math.random
  10. if isObjectInACLGroup("user."..Deadusergroup, aclGetGroup("Polis")) or isObjectInACLGroup("user."..Deadusergroup, aclGetGroup("someGroup")) then
  11. 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
  12. Keiichi1

    Play Sound

    You won't get help with this attitude, trust me. Start learning...
  13. Keiichi1

    Play Sound

    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.
  14. 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)
  15. There's no marker element in your code.