Jump to content

CastiaL

Members
  • Posts

    82
  • Joined

  • Last visited

  • Days Won

    2

CastiaL last won the day on August 12 2021

CastiaL had the most liked content!

2 Followers

About CastiaL

  • Birthday May 11

Details

  • Location
    Turkey
  • Interests
    Script

Recent Profile Visitors

4,435 profile views

CastiaL's Achievements

Punk-@ss B*tch

[email protected] B*tch (12/54)

15

Reputation

1

Community Answers

  1. What could be the Problem here? also i am using version 0.4 since i am using directadmin. I opened the account in the php file from the console and gave full authorization, but I am getting this error.
  2. local function playerChat(message, messageType) if messageType == 0 then --Global (main) chat cancelEvent() local red, green, blue = getPlayerNametagColor(source) outputChatBox(getPlayerName(source)..": #FFFFFF"..message, root, red, green, blue, true ) outputServerLog("CHAT: "..getPlayerName(source)..": "..message) end end addEventHandler("onPlayerChat", root, playerChat)
  3. function guardarAuto() player = source local veh = getNearestVehicle(player,5) or Ped.getOccupiedVehicle(player) if (veh) then local acc = player:getAccount() local owner = acc:getName() local location = player:getPosition() local rotation = player:getRotation() local int = player:getInterior() local dim = player:getDimension() local loc = toJSON({location.x,location.y,location.z}) local rot = toJSON({rotation.x,rotation.y,rotation.z}) if (veh:getData("vehicles:owner") == owner) then local id = getElementData(veh, "vehicles:id") end end end) addEventHandler("onPlayerQuit", root, guardarAuto) Can you try this
  4. function phoenix( player ) local accName = getAccountName (getPlayerAccount ( player )) if isObjectInACLGroup("user."..accName, aclGetGroup ( "Moderator" )) or isObjectInACLGroup("user."..accName, aclGetGroup ( "Admin" )) then triggerEvent('phoenix', root, player) end end addCommandHandler ( "phoenix", phoenix ) function phoenixLogin( player ) --code end addEvent('phoenix', true) addEventHandler("phoenix", root, phoenixLogin)
  5. Try changing the values of "theTargetElement" to "target"
  6. local screenW, screenH = guiGetScreenSize() local dxnum = { } for i=1,12 do dxnum[i] = 255 end local num = {} local text = "" function outputFunction(result) outputChatBox(result) --- Bla bla bla end addEventHandler("onClientResourceStart", resourceRoot, function() target = dxCreateRenderTarget(screenW, screenH, true) dxSetRenderTarget( target ) dxDrawRectangle(screenW * 0.3772, screenH * 0.2500, screenW * 0.2390, screenH * 0.5156, tocolor(52, 52, 52, 255), false) dxDrawRectangle(screenW * 0.3846, screenH * 0.2734, screenW * 0.2243, screenH * 0.0404, tocolor(255, 255, 255, 255), false) dxDrawRectangle(screenW * 0.4110, screenH * 0.3477, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[1]), false) dxDrawRectangle(screenW * 0.4713, screenH * 0.3477, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[2]), false) dxDrawRectangle(screenW * 0.5331, screenH * 0.3477, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[3]), false) dxDrawRectangle(screenW * 0.4110, screenH * 0.4388, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[4]), false) dxDrawRectangle(screenW * 0.4713, screenH * 0.4388, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[5]), false) dxDrawRectangle(screenW * 0.5331, screenH * 0.4388, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[6]), false) dxDrawRectangle(screenW * 0.4110, screenH * 0.5299, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[7]), false) dxDrawRectangle(screenW * 0.4713, screenH * 0.5299, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[8]), false) dxDrawRectangle(screenW * 0.5331, screenH * 0.5299, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[9]), false) dxDrawRectangle(screenW * 0.4110, screenH * 0.6693, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[10]), false) dxDrawRectangle(screenW * 0.4713, screenH * 0.6693, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[11]), false) dxDrawRectangle(screenW * 0.5331, screenH * 0.6693, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[12]), false) dxDrawText(text, screenW * 0.3846, screenH * 0.2734, screenW * 0.6089, screenH * 0.3138, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(1, screenW * 0.4110, screenH * 0.3477, screenW * 0.4610, screenH * 0.4258, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(2, screenW * 0.4713, screenH * 0.3477, screenW * 0.5213, screenH * 0.4258, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(3, screenW * 0.5331, screenH * 0.3477, screenW * 0.5831, screenH * 0.4258, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(4, screenW * 0.4110, screenH * 0.4388, screenW * 0.4610, screenH * 0.5169, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(5, screenW * 0.4713, screenH * 0.4388, screenW * 0.5213, screenH * 0.5169, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(6, screenW * 0.5331, screenH * 0.4388, screenW * 0.5831, screenH * 0.5169, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(7, screenW * 0.4110, screenH * 0.5299, screenW * 0.4610, screenH * 0.6081, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(8, screenW * 0.4713, screenH * 0.5299, screenW * 0.5213, screenH * 0.6081, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(9, screenW * 0.5331, screenH * 0.5299, screenW * 0.5831, screenH * 0.6081, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("ESC", screenW * 0.4110, screenH * 0.6693, screenW * 0.4610, screenH * 0.7474, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("OK", screenW * 0.4713, screenH * 0.6693, screenW * 0.5213, screenH * 0.7474, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxSetRenderTarget() end ) function keypad () if target then dxDrawImage ( 0, 0, screenW, screenH, target ) end end table.insert(num, guiCreateButton(screenW * 0.4110, screenH * 0.3477, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.4713, screenH * 0.3477, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.5331, screenH * 0.3477, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.4110, screenH * 0.4388, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.4713, screenH * 0.4388, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.5331, screenH * 0.4388, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.4110, screenH * 0.5299, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.4713, screenH * 0.5299, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.5331, screenH * 0.5299, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.4110, screenH * 0.6693, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.4713, screenH * 0.6693, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.5331, screenH * 0.6693, screenW * 0.0500, screenH * 0.0781, "", false)) for i=1, #num do guiSetAlpha(num[i], 0) guiSetVisible(num[i], false) end addEventHandler( "onClientMouseEnter", getRootElement(), function() for i=1, #num do if source == num[i] then dxnum[i] = 220 end end end) addEventHandler( "onClientMouseLeave", getRootElement(), function() for i=1, #num do if source == num[i] then dxnum[i] = 255 end end end) function toggleCursor () showCursor(not isCursorShowing()) for i=1, #num do guiSetVisible(num[i], isCursorShowing()) end if isCursorShowing() then addEventHandler ("onClientRender", root, keypad) else removeEventHandler ("onClientRender", root, keypad) end end bindKey("m", "down", toggleCursor) function keypadClick(button, state) if button == "left" then for i=1,12 do if source == num[i] then if i <= 9 then text = text..i elseif i == 10 then text = text:sub( 1, #text - 1 ) elseif i == 11 then showCursor(false) for i=1, #num do guiSetVisible(num[i], isCursorShowing()) end removeEventHandler ("onClientRender", root, keypad) outputFunction(text) end end end end end addEventHandler("onClientGUIClick", root, keypadClick) Made a few improvements to the code thanks @mmert.juju
  7. local screenW, screenH = guiGetScreenSize() local dxnum = { } for i=1,12 do dxnum[i] = 255 end local num = {} local text = "" function outputFunction(result) outputChatBox(result) --- Bla bla bla end function keypad () dxDrawRectangle(screenW * 0.3772, screenH * 0.2500, screenW * 0.2390, screenH * 0.5156, tocolor(52, 52, 52, 255), false) dxDrawRectangle(screenW * 0.3846, screenH * 0.2734, screenW * 0.2243, screenH * 0.0404, tocolor(255, 255, 255, 255), false) dxDrawRectangle(screenW * 0.4110, screenH * 0.3477, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[1]), false) dxDrawRectangle(screenW * 0.4713, screenH * 0.3477, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[2]), false) dxDrawRectangle(screenW * 0.5331, screenH * 0.3477, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[3]), false) dxDrawRectangle(screenW * 0.4110, screenH * 0.4388, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[4]), false) dxDrawRectangle(screenW * 0.4713, screenH * 0.4388, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[5]), false) dxDrawRectangle(screenW * 0.5331, screenH * 0.4388, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[6]), false) dxDrawRectangle(screenW * 0.4110, screenH * 0.5299, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[7]), false) dxDrawRectangle(screenW * 0.4713, screenH * 0.5299, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[8]), false) dxDrawRectangle(screenW * 0.5331, screenH * 0.5299, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[9]), false) dxDrawRectangle(screenW * 0.4110, screenH * 0.6693, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[10]), false) dxDrawRectangle(screenW * 0.4713, screenH * 0.6693, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[11]), false) dxDrawRectangle(screenW * 0.5331, screenH * 0.6693, screenW * 0.0500, screenH * 0.0781, tocolor(255, 255, 255, dxnum[12]), false) result = dxDrawText(text, screenW * 0.3846, screenH * 0.2734, screenW * 0.6089, screenH * 0.3138, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(1, screenW * 0.4110, screenH * 0.3477, screenW * 0.4610, screenH * 0.4258, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(2, screenW * 0.4713, screenH * 0.3477, screenW * 0.5213, screenH * 0.4258, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(3, screenW * 0.5331, screenH * 0.3477, screenW * 0.5831, screenH * 0.4258, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(4, screenW * 0.4110, screenH * 0.4388, screenW * 0.4610, screenH * 0.5169, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(5, screenW * 0.4713, screenH * 0.4388, screenW * 0.5213, screenH * 0.5169, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(6, screenW * 0.5331, screenH * 0.4388, screenW * 0.5831, screenH * 0.5169, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(7, screenW * 0.4110, screenH * 0.5299, screenW * 0.4610, screenH * 0.6081, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(8, screenW * 0.4713, screenH * 0.5299, screenW * 0.5213, screenH * 0.6081, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(9, screenW * 0.5331, screenH * 0.5299, screenW * 0.5831, screenH * 0.6081, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("ESC", screenW * 0.4110, screenH * 0.6693, screenW * 0.4610, screenH * 0.7474, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("OK", screenW * 0.4713, screenH * 0.6693, screenW * 0.5213, screenH * 0.7474, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) end table.insert(num, guiCreateButton(screenW * 0.4110, screenH * 0.3477, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.4713, screenH * 0.3477, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.5331, screenH * 0.3477, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.4110, screenH * 0.4388, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.4713, screenH * 0.4388, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.5331, screenH * 0.4388, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.4110, screenH * 0.5299, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.4713, screenH * 0.5299, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.5331, screenH * 0.5299, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.4110, screenH * 0.6693, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.4713, screenH * 0.6693, screenW * 0.0500, screenH * 0.0781, "", false)) table.insert(num, guiCreateButton(screenW * 0.5331, screenH * 0.6693, screenW * 0.0500, screenH * 0.0781, "", false)) for i=1, #num do guiSetAlpha(num[i], 0) guiSetVisible(num[i], false) end addEventHandler( "onClientMouseEnter", getRootElement(), function() for i=1, #num do if source == num[i] then dxnum[i] = 220 end end end) addEventHandler( "onClientMouseLeave", getRootElement(), function() for i=1, #num do if source == num[i] then dxnum[i] = 255 end end end) function toggleCursor () showCursor(not isCursorShowing()) for i=1, #num do guiSetVisible(num[i], isCursorShowing()) end if isCursorShowing() then addEventHandler ("onClientRender", root, keypad) else removeEventHandler ("onClientRender", root, keypad) end end bindKey("m", "down", toggleCursor) function keypadClick(button, state) if button == "left" then for i=1,12 do if source == num[i] then if i <= 9 then text = text..i elseif i == 10 then text = text:sub( 1, #text - 1 ) elseif i == 11 then showCursor(false) for i=1, #num do guiSetVisible(num[i], isCursorShowing()) end removeEventHandler ("onClientRender", root, keypad) outputFunction(text) end end end end end addEventHandler("onClientGUIClick", root, keypadClick) It Took About An Hour To Fix, Glad If I Could Help
  8. sx,sy = guiGetScreenSize() function testShowFuel() if isPedInVehicle(localPlayer) then dxDrawRectangle(sx-210,sy-30,200,20,tocolor(0,0,0,120)) if getElementData(getPedOccupiedVehicle(localPlayer), "fuel") then fuel = getElementData(getPedOccupiedVehicle(localPlayer), "fuel") else fuel = 100 end dxDrawRectangle(sx-210,sy-30,fuel/100*200,20,tocolor(127,198,118,255)) dxDrawText ( fuel.."/100", sx-210,sy-30, sx-210+(fuel/100*200), sy-10, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" ) end end addEventHandler("onClientRender", root, testShowFuel) Eu acho que você precisa de algo assim Exemplo 95/100
  9. I found this article with a little research, maybe it will be of use to you.
  10. Unfortunately, only these solutions are available to me at the moment.
  11. _interpolateBetween = interpolateBetween function interpolateBetween(from, to, progress, easing) return _interpolateBetween(unpack(from), unpack(to), progress, easing) end -- example interpolateBetween( from = { 0, 0, 0 }, to = { 10, 10, 10 }, progress = 0.5, easing = "Linear" ) or _interpolateBetween = interpolateBetween function interpolateBetween(table) return _interpolateBetween(unpack(table.from), unpack(table.to), table.progress, table.easing) end -- example interpolateBetween({ from = { 0, 0, 0 }, to = { 10, 10, 10 }, progress = 0.5, easing = "Linear" })
×
×
  • Create New...