• Content Count

  • Joined

  • Last visited

Community Reputation

9 Neutral


About Keiichi1

  • Rank
  • Birthday 12/01/2004


  • Location
  • Occupation
  • Interests

Recent Profile Visitors

610 profile views
  1. Keiichi1

    [HELP] Unlimited Money

    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. Keiichi1

    [HELP]Move with cursor enabled

    onClientKey setPedControlState
  3. Keiichi1

    Help How to add animated object

    You can't animate objects. Use moveObject
  4. Keiichi1

    Custom Animations Question

    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. Keiichi1


    I think it is not possible in MTA, but wait for someone elses' answer.
  6. Keiichi1


    You can change some object properties using ColEditor 2. Try it.
  7. Keiichi1


    Replace the default objects with custom ones. This is the only method, you can't add more objects. Example 4.
  8. Keiichi1

    [HELP] ElementData Problem

    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. Keiichi1

    [Script] Repeat 3DSound

    Set a random interval timer. setTimer math.random
  10. Keiichi1

    [HELP] Script code

    if isObjectInACLGroup("user."..Deadusergroup, aclGetGroup("Polis")) or isObjectInACLGroup("user."..Deadusergroup, aclGetGroup("someGroup")) then
  11. Keiichi1

    [Help] Direction of vehicles

    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. Keiichi1

    Vehicle damae proof

    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. Keiichi1

    [HELP] Play Sound

    There's no marker element in your code.