Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. It doesn't have to be onResourceStart, it might be on an event, that is executed too early. "onGamemodeMapStart" , maybe that?
  2. He added all the arguments in spawnPlayer to the table.
  3. Online Lua compiler by dzek (our trusted moderator!) LUAC GUI (Lua Compiler) by FabienWang File or Directory Compiler GUI by xtreamlua.com (found & tested by Ransom)
  4. In fr_client.lua, From line 881 to line 986. That's the part for upgrades, edit it.
  5. If it's server: executeCommandHandler ( "weed" , player , "plant 1" ) Client: executeCommandHandler ( "weed", "plant 1" ) My bad btw, I thought you specify it with several arguments, not one argument.
  6. In what script/resource? They won't add anything, unless there is a script for it.
  7. if (tonumber(guiGetText(guiWeedSeed))>0) then guiSetText(guiWeedSeed, tostring(tonumber(guiGetText(guiSeedWeed))-1)) setTimer (guiWeedTimer, 1000, 100) else
  8. Are you kidding me? You don't have time? Then don't play MTA at all.
  9. Middle? Should be centre: dxDrawText(getPlayerNametagText(player), sx-offset, sy, (sx-offset)+130 / distance, sy+20 / distance, tocolor(r, g, b, 220), scale, font, "center", "center", false, false, false)
  10. JR10

    Problems

    Try: if (guiCheckBoxGetSelected(user_safe) == true) then safe = xmlLoadFile("safe.xml") child = xmlFindChild(safe,"Username",0) if (xmlNodeGetValue(child) ~= nil) then xmlNodeSetValue(child,username) if (xmlNodeGetValue(child1) ~= "") then child2 = xmlFindChild(safe,"Username2",0) if (xmlNodeGetValue(child2) ~= "") then outputChatBox("*INFO*: THERE IS NO MORE SPACE IN YOUR SAFE DIRECTORY TO SAVE YOUR USERNAME!",getLocalPlayer(),255,0,0) else xmlNodeSetValue(child2,username) end else xmlNodeSetValue(child1,username) end else child1 = xmlFindChild(safe,"Username1",0) end end
  11. No. Are you sure the path is correct, and it's in the meta.xml?
  12. for index , player in ipairs ( getPlayersInTeam ( getTeamFromName ( "CarJacker" ) ) ) do outputChatBox("Go get the stolen car! It is marked on your map.", player, 255,0,0) end Sorry, my bad, I was mistaken at the team name.
  13. triggerEvent, triggerServerEvent, triggerClientEvent Is for triggering events, not functions, or commands. executeCommandHandler ( "weed" , player , "plant" , "1" )
  14. This is not a request forum, learn and make it yourself. Wiki
  15. Example for unpack: local dataTable = { 0 , 0 , 0 } -- dataTable = { posX , posY , posZ } local posX , posY , posZ = unpack ( dataTable ) unpack unpacks the table. If my code didn't work, post what you did.
  16. local randPosTable = { { 0 , 0 , 0 } , { 1 , 1 , 1 } , --etc } function getRandomData ( table ) return table [ math.random ( #table ) ] end now use it like getRandomData ( randPosTable ) And the returned data will be a table, since the data in the table is several tables So you will use it like: local data = getRandomData ( randPosTable ) local x = data [ 1 ] local y = data [ 2 ] local z = data [ 3 ]
  17. What is this? onPlayerChooseTeam doesn't exist, so you added, but you really expect it to work like that? You must use: triggerEvent, triggerClientEvent, triggerServerEvent To trigger a custom event.
  18. Please tell me you are kidding.
  19. Well, he should edit it to suit him now, add groups etc. We are not his slaves.
  20. if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) then if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Moderator" ) ) then
  21. function rewardOnWasted ( killer ) local exp = getElementData(killer,"exp") if exp then setElementData(killer,"exp",tonumber(getElementData(killer,"exp"))+5) outputChatBox("Experience gained +5! total ".. tonumber(exp)+5,killer,255,255,0) triggerClientEvent ( killer , "playSound" , killer ) else setElementData(killer,"exp",5) triggerClientEvent ( killer , "playSound" , killer ) end end addEventHandler ( "onPlayerWasted", getRootElement(), rewardOnWasted ) addEventHandler("onResourceStart" , resourceRoot , function() exports.scoreboard:addScoreboardColumn("exp") end) I told you to add it on resource start.
×
×
  • Create New...