Jump to content

TorNix~|nR

Members
  • Posts

    503
  • Joined

  • Last visited

Everything posted by TorNix~|nR

  1. Oww, it's working, thank you so much
  2. Thanks, but can you help me more?
  3. Hello guys, I made this script, but when a player wasted or quit, it doesn't destroy ? help please? mark = createMarker( -2066.05, 1430.57, 6.10, "cylinder", 2, 120, 62, 62, 150 ) local vehicles99ui = {} function fun(hitPlayer) local x, y, z = getElementPosition(source) if hitPlayer and getElementType(hitPlayer) == "player" and not isPedInVehicle (hitPlayer) then if ( getPlayerTeam ( hitPlayer ) == getTeamFromName ( "L.K.S" ) ) then if isElement(vehicles99ui) then destroyElement(vehicles99ui) end vehicles99ui = createVehicle(461, -2088.01, 1369.97, 6.10) setVehicleColor (vehicles99ui, 120, 62, 62, 120, 62, 62) warpPedIntoVehicle(hitPlayer, vehicles99ui) else outputChatBox ("",hitPlayer, 120, 62, 62, true) end end end addEventHandler("onMarkerHit",mark,fun) addEventHandler("onPlayerQuit", root, function() if isElement(vehicles99ui) then destroyElement(vehicles99ui) vehicles99ui = nil end end) addEventHandler("onPlayerWasted", root, function() if isElement(vehicles99ui) then destroyElement(vehicles99ui) vehicles99ui = nil end end)
  4. is it the same? because I'm using dxDrawImage, not text
  5. Hello guys, I have a hud script, when I make it like this on the top and right dxDrawImage(sWidth-300,170,400,150,"icons/".. tostring(weaponID) .. ".png",0.0,0.0,0.0,tocolor(255,255,255,255),false) it shows to all, from the 800x600 to the 1920x1080, with the same place but when I make it on bottom and left (up to radar) like this dxDrawImage(sWidth-1900,600,400,150,"icons/".. tostring(weaponID) .. ".png",0.0,0.0,0.0,tocolor(255,255,255,255),false) it only show for high resolutions like 1920x1080 (I'm currently use) any help please to fix it?
  6. I mean, I want to make it get the lights automatically and change the logo, the logo get changed only by pressing 'L' I want to make it automatically, help please?
  7. I used this guiSetInputEnabled(true) guiSetInputMode ( "no_binds" ) and it works by theway, I'm talking about the editbox it worked can not use the binds for example "L" "P" ... etc but the player can use the F1/F2/F3..... etc help please?
  8. I want when a player join, he can not use the F1 F2 F3, for example all panels
  9. TorNix~|nR

    Question

    Hello guys, I need help please! when someone join to server, I want to set this function a() guiSetInputEnabled(true) guiSetInputMode ( "no_binds_when_editing" ) end addEventHandler("onClientPlayerJoin", getRootElement(), a) but it's not working, how can I make it for example when someone join, it disable using binds and when login back to normal?
  10. Hello guys, I have my speedometer script, it's working fine but when the lights are off it change to SPEEDOM0.png, and when the lights on it change to SPEEDOM1.png but there is a problem, it only change the logo when press 'L', it's not automatically check I want to make it with this getVehicleOverrideLights Code lightState = 0 localPlayer = getLocalPlayer () addEventHandler("onClientVehicleEnter", getRootElement(), function(thePlayer, seat) if thePlayer == getLocalPlayer() then if seat == 0 then bindKey ( "l", "down", showLightState_panel ) addEventHandler("onClientRender",root, showPanel_main ) lightState = getVehicleOverrideLights ( source ) or 0 end end end ) addEventHandler("onClientVehicleExit", getRootElement(), function(thePlayer, seat) if thePlayer == getLocalPlayer() then if seat == 0 then removeEventHandler("onClientRender",root, showPanel_main ) unbindKey ( "l", "down" ) lightState = 0 end end end ) local screenX, screenY = guiGetScreenSize() function toposition(x,y) local finalX,finalY = x,y if x > 1 then finalX = x elseif x < -1 then finalX = screenX - x elseif x > 0 then finalX = screenX * x else finalX = screenX - (screenX * x) end -- if y > 1 then finalY = y elseif y < -1 then finalY = screenY - y elseif y > 0 then finalY = screenY * y else finalY = screenY - (screenY * y) end return finalX,finalY end ------------------------------- Панель function showPanel_main () if not getPedOccupiedVehicle ( localPlayer ) then removeEventHandler("onClientRender",root, showPanel_main ) unbindKey ( "l", "down" ) lightState = 0 return true end local vehicleSpeed = getVehicleSpeed() local fuel = getElementData(getPedOccupiedVehicle ( localPlayer ), "vehicleFuel" ) or 0 fuel_t = (fuel-100)-(fuel-100)/3 if fuel_t > 60 then fuel_t = 60 end if fuel_t < -60 then fuel_t = -60 end if lightState == 0 or lightState == 1 then dxDrawImage(screenX-400, screenY-300,400,343,"SPEEDOM0.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) dxDrawImage(screenX-218, screenY-190, 140, 115,"ARROWB0.png",vehicleSpeed-135,0.0,0.0,tocolor(255,255,255,255),false) dxDrawImage(screenX-367, screenY-140, 120, 115,"ARROWN0.png",fuel_t,0.0,0.0,tocolor(255,255,255,255),false) else dxDrawImage(screenX-400, screenY-300,400,343,"SPEEDOM1.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) dxDrawImage(screenX-218, screenY-190, 140, 115,"ARROWB1.png",vehicleSpeed-135,0.0,0.0,tocolor(255,255,255,255),false) dxDrawImage(screenX-367, screenY-140, 120, 115,"ARROWN1.png",fuel_t,0.0,0.0,tocolor(255,255,255,255),false) end if getElementData(getPedOccupiedVehicle ( localPlayer ), "vehicleFuel" ) < 40 then dxDrawImage(screenX-267, screenY-64, 30, 30,"ICON2.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end end ------------------------------- Освещение function showLightState_panel () if lightState == 0 or lightState == 1 then lightState = 2 setVehicleOverrideLights( getPedOccupiedVehicle ( localPlayer ), 2 ) else setVehicleOverrideLights( getPedOccupiedVehicle ( localPlayer ), 1 ) lightState = 0 end end ----------------------- function getVehicleSpeed() if isPedInVehicle(localPlayer) then local vx, vy, vz = getElementVelocity(getPedOccupiedVehicle(localPlayer)) return math.sqrt(vx^2 + vy^2 + vz^2) * 155 end return 0 end --addEventHandler("onClientRender",root, showPanel_main ) Guys help me please!
  11. It was a little problem the code I post is correct, but I use the incorrect one I use this function getAccountCount(player) local serial = getPlayerSerial(player) local accounts = getAccountsBySerial(serial) if(accounts) and (type(accounts == "table")) then return end return false end instead of function getAccountCount(player) local serial = getPlayerSerial(player) local accounts = getAccountsBySerial(serial) if(accounts) and (type(accounts == "table")) then return #accounts end return false end Thank you for asking.
  12. No debug I don't know the problem Problem fixed, thank you guys.
  13. Hello guys, I made a register max attemps for users, a maximum 3 accounts for each serial but I don't know where is the problem, help please? function register(username, password) if (getAccountCount(source) >= 3) then displayServerMessageLogin(source, "Error", "warning") return end if not (username == "") then if not (password == "") then local account = getAccount(username, password) if (account == false) then local accountAdded = addAccount(tostring(username), tostring(password)) if (accountAdded) then displayServerMessageLogin(source, "Login: "..username.." | Password: "..password.."", "confirm") else displayServerMessageLogin(source, "Error, please try again", "warning") end else displayServerMessageLogin(source, "This user name already exists", "warning") end else displayServerMessageLogin(source, "Type your password", "warning") end else displayServerMessageLogin(source, "Enter your username", "warning") end end addEvent("register", true) addEventHandler("register", getRootElement(), register) function getAccountCount(player) local serial = getPlayerSerial(player) local accounts = getAccountsBySerial(serial) if(accounts) and (type(accounts == "table")) then return #accounts end return false end
  14. When a player for example use a command /facebook it automatically copy the facebook link, is an example
  15. Hello guys, I want when player use a command, it automatically copy a message, please help onPlayerCommand
  16. Well, actually I don't know, it's all about the eventhandler, but I added this code on the login panel, then I used the code while login addEventHandler("onClientRender",root, dxTxt) and it worked fine. Thank you for everything
  17. Yeah, I fixed it, thank you for help guys
  18. @coNolel, not working help please?
  19. Guys, how to use this, it's not working the working one is addEventHandler("onClientRender",getRootElement(), but I want it when the playerlogin, help please addEventHandler("onClientPlayerLogin",getRootElement(), ---------- function ( ) local Text = Msg[CreatedMsg+1] dxDrawText(tostring ( Text ), (screenW * 0.0113) - 1, (screenH * 0.9367) - 1, (screenW * 0.4850) - 1, (screenH * 1.0000) - 1, tocolor(0, 0, 0, 255), 1.00, font, "left", "center", true, true, false, true, false) dxDrawText(tostring ( Text ), (screenW * 0.0113) + 1, (screenH * 0.9367) - 1, (screenW * 0.4850) + 1, (screenH * 1.0000) - 1, tocolor(0, 0, 0, 255), 1.00, font, "left", "center", true, true, false, true, false) dxDrawText(tostring ( Text ), (screenW * 0.0113) - 1, (screenH * 0.9367) + 1, (screenW * 0.4850) - 1, (screenH * 1.0000) + 1, tocolor(0, 0, 0, 255), 1.00, font, "left", "center", true, true, false, true, false) dxDrawText(tostring ( Text ), (screenW * 0.0113) + 1, (screenH * 0.9367) + 1, (screenW * 0.4850) + 1, (screenH * 1.0000) + 1, tocolor(0, 0, 0, 255), 1.00, font, "left", "center", true, true, false, true, false) dxDrawText(tostring ( Text ), screenW * 0.0113, screenH * 0.9367, screenW * 0.4850, screenH * 1.0000, tocolor(200, 200, 200, 255), 1.00, font, "left", "center", true, true, false, true, false) end )
  20. Create a server-side scritp, then add the Serve-Side then go to 'scoreboard' resource, then open dxscoreboard_client after that add the Client-Side on line 724 before this code: dxDrawImage ( topX+theX, y, itemWidth, itemHeight, content.src, content.rot, content.rotOffX, content.rotOffY, content.color, drawOverGUI ) end If you got a problem, tell me.
  21. @IIYAMA, you are free, whenever you want, but please don't come back take care !
  22. You mean the boss script?
×
×
  • Create New...