1LoL1
Members-
Posts
944 -
Joined
-
Last visited
Everything posted by 1LoL1
-
Tire, Engine already works but not tank parts and is even higher.. : And here's the error.. :
-
Already it looks a little better all the time but it's not Line: 1282 if engine == needengine then Line: 672 if ((setElementData(col,"Tire_inVehicle"), math.random (0, tonumber(tires)) then
-
Please help me I want to add only tank parts
-
local veh = getPedOccupiedVehicle(getLocalPlayer()) if veh then local maxfuel = getElementData(veh, "maxfuel") local fuel = getElementData(getElementData(veh, "parent"), "fuel") local needengine = getElementData(veh, "needengines") local needtires = getElementData(veh, "needtires") local needparts = getElementData(veh, "needparts") local engine = getElementData(getElementData(veh, "parent"), "Engine_inVehicle") or 0 local tires = getElementData(getElementData(veh, "parent"), "Tire_inVehicle") or 0 local parts = getElementData(getElementData(veh, "parent"), "Parts_inVehicle") or 0 local offset = dxGetFontHeight(1.02, "default-bold") local w = dxGetTextWidth(tostring(engine) .. "/" .. tostring(needengine) .. " Engine", 1.02, "default-bold") if engine == needengine then r, g, b = 0, 255, 0 else r, g, b = 255, 0, 0 end dxDrawText(tostring(engine) .. "/" .. tostring(needengine) .. " Engine", screenWidth * 0.5 - w / 2, screenHeight * 0, screenWidth * 0.5 - w / 2, screenHeight * 0, tocolor(r, g, b, 220), 1.02, "default-bold") local w = dxGetTextWidth(tostring(tires) .. "/" .. tostring(needtires) .. " Tires", 1.02, "default-bold") if tires == needtires then r, g, b = 0, 255, 0 else r, g, b = 255, 0, 0 end dxDrawText(tostring(tires) .. "/" .. tostring(needtires) .. " Tires", screenWidth * 0.5 - w / 2, screenHeight * 0 + offset, screenWidth * 0.5 - w / 2, screenHeight * 0 + offset, tocolor(r, g, b, 220), 1.02, "default-bold") local w = dxGetTextWidth(tostring(parts) .. "/" .. tostring(needparts) .. " Tank Parts", 1.02, "default-bold") if parts == needparts then r, g, b = 0, 255, 0 else r, g, b = 255, 0, 0 end dxDrawText(tostring(parts).."/"..tostring(needparts).." Tank Parts", screenWidth * 0.5 - w / 2, screenHeight * 0 + offset, screenWidth * 0.5 - w / 2, screenHeight * 0 + offset, tocolor(r, g, b, 220), 1.02, "default-bold") local w = dxGetTextWidth("Fuel:" .. math.floor(fuel) .. "/" .. maxfuel, 1.02, "default-bold") if fuel == maxfuel then r,g,b = 0,255,0 elseif fuel < maxfuel/10 then r,g,b = 255,0,0 elseif fuel < maxfuel/4 then r,g,b = 255,50,0 elseif fuel < maxfuel/3 then r,g,b = 200,100,0 elseif fuel < maxfuel/2 then r,g,b = 125,200,0 elseif fuel < maxfuel/1.5 then r,g,b = 50,200,0 end dxDrawText ("Fuel:"..math.floor(fuel).."/"..maxfuel,screenWidth*0.5-w/2 , screenHeight*0+offset*2,screenWidth*0.5-w/2 , screenHeight*0+offset*2,tocolor ( r,g,b, 220 ), 1.02, "default-bold" ) end so to me it shows And here is the error: ToString everywhere I put everything I have done according Engine.
-
And this he enters a car.. setElementData(vehCol,"Parts_inVehicle",math.random(0,parts)) And yet this writing me when I write /svp if ((getElementData(col,"Parts_inVehicle") or 0) < tonumber(parts)) then Please help someone
-
I have this problem as here Url: https://forum.multitheftauto.com/viewtopic.php?f=91&t=70730&p=658173&hilit=tank+parts#p658173 And I wrote this Screen: Script: local veh = getPedOccupiedVehicle(getLocalPlayer()) if veh then local maxfuel = getElementData(veh, "maxfuel") local fuel = getElementData(getElementData(veh, "parent"), "fuel") local needengine = getElementData(veh, "needengines") local needtires = getElementData(veh, "needtires") local needparts = getElementData(veh, "needparts") local engine = getElementData(getElementData(veh, "parent"), "Engine_inVehicle") or 0 local tires = getElementData(getElementData(veh, "parent"), "Tire_inVehicle") or 0 local parts = getElementData(getElementData(veh, "parent"), "Parts_inVehicle") or 0 local offset = dxGetFontHeight(1.02, "default-bold") local w = dxGetTextWidth(engine .. "/" .. needengine .. " Engine", 1.02, "default-bold") if engine == needengine then r, g, b = 0, 255, 0 else r, g, b = 255, 0, 0 end dxDrawText(engine .. "/" .. needengine .. " Engine", screenWidth * 0.5 - w / 2, screenHeight * 0, screenWidth * 0.5 - w / 2, screenHeight * 0, tocolor(r, g, b, 220), 1.02, "default-bold") local w = dxGetTextWidth(tires .. "/" .. needtires .. " Tires", 1.02, "default-bold") if tires == needtires then r, g, b = 0, 255, 0 else r, g, b = 255, 0, 0 end dxDrawText(tires .. "/" .. needtires .. " Tires", screenWidth * 0.5 - w / 2, screenHeight * 0 + offset, screenWidth * 0.5 - w / 2, screenHeight * 0 + offset, tocolor(r, g, b, 220), 1.02, "default-bold") local w = dxGetTextWidth(tostring(parts).."/"..tostring(needparts).." Tank Parts",1.02,"default-bold") if parts == needparts then r, g, b = 0, 255, 0 else r, g, b = 255, 0, 0 end dxDrawText(tostring(parts).."/"..tostring(needparts).." Tank Parts", screenWidth * 0.5 - w / 2, screenHeight * 0 + offset, screenWidth * 0.5 - w / 2, screenHeight * 0 + offset, tocolor(r, g, b, 220), 1.02, "default-bold") local w = dxGetTextWidth("Fuel:" .. math.floor(fuel) .. "/" .. maxfuel, 1.02, "default-bold") if fuel == maxfuel then r,g,b = 0,255,0 elseif fuel < maxfuel/10 then r,g,b = 255,0,0 elseif fuel < maxfuel/4 then r,g,b = 255,50,0 elseif fuel < maxfuel/3 then r,g,b = 200,100,0 elseif fuel < maxfuel/2 then r,g,b = 125,200,0 elseif fuel < maxfuel/1.5 then r,g,b = 50,200,0 end dxDrawText ("Fuel:"..math.floor(fuel).."/"..maxfuel,screenWidth*0.5-w/2 , screenHeight*0+offset*2,screenWidth*0.5-w/2 , screenHeight*0+offset*2,tocolor ( r,g,b, 220 ), 1.02, "default-bold" ) end And here I wrote a mistake .. if engine == needengine then
-
When I write /svp so I wrote this
-
Please anyone knows what is wrong? 360 - setElementData(vehCol,"fuel",10)
-
Again it there
-
Copied: https://community.multitheftauto.com/index.php?p=resources&s=details&id=9702 Original: https://community.multitheftauto.com/index.php?p=resources&s=details&id=6623 DONE
-
You can add your own groups to it. Add those who you want to be able to open it. Or do you mean you want to work without these groups but with accounts? I think also the group that has, for example, Castillo .. and there I create as "Skillers" Just you and people who are in Skillers will be able to open / close BASE. and this with admin panel has nothing to do ..
-
But these groups are not in the admin panel? acceptedGroups = { "Admin", "Console", "Skillers", "Skillers2", }
-
It has something to do with admin panel?
-
This is what I saw there .. but I know that I have seen such a script without this. And the admin panel to unrelated. accountname = getAccountName (getPlayerAccount(tPlayer)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( stringData ) )
-
But that any group as "Skillers" so I enter there Skillers, and only players who are in this group so they can open and close the base.