-
Posts
2,947 -
Joined
-
Last visited
Everything posted by JR10
-
It doesn't have to be onResourceStart, it might be on an event, that is executed too early. "onGamemodeMapStart" , maybe that?
-
He added all the arguments in spawnPlayer to the table.
-
You welcome.
-
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)
-
In fr_client.lua, From line 881 to line 986. That's the part for upgrades, edit it.
-
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.
-
In what script/resource? They won't add anything, unless there is a script for it.
-
if (tonumber(guiGetText(guiWeedSeed))>0) then guiSetText(guiWeedSeed, tostring(tonumber(guiGetText(guiSeedWeed))-1)) setTimer (guiWeedTimer, 1000, 100) else
-
Are you kidding me? You don't have time? Then don't play MTA at all.
-
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)
-
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
-
No. Are you sure the path is correct, and it's in the meta.xml?
-
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.
-
triggerEvent, triggerServerEvent, triggerClientEvent Is for triggering events, not functions, or commands. executeCommandHandler ( "weed" , player , "plant" , "1" )
-
This is not a request forum, learn and make it yourself. Wiki
-
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.
-
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 ]
-
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.
-
Please tell me you are kidding.
-
Well, he should edit it to suit him now, add groups etc. We are not his slaves.
-
if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) then if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Moderator" ) ) then
-
No, check the wiki's example.
-
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.
-
isObjectInACLGroup