Jump to content

lsd1999

Members
  • Posts

    17
  • Joined

  • Last visited

Everything posted by lsd1999

  1. The script changes all car sounds can you give me new download link?
  2. client text = "" function setText(exp, needxp) text = "Experience: ".. exp .. "/" .. needexp end addEvent("drawDxText", true) addEventHandler("drawDxText", root, setText) function renderText() if (#text > 0) then local sw, sh = guiGetScreenSize() dxDrawText (text, 50, sy-50) end end addEventHandler("onClientRender", root, renderText) server function experience () for i, pPlayer in ipairs( getElementsByType( "player" ) ) do local pAccount = getPlayerAccount( pPlayer ) local exp = getAccountData(pAccount, "exp") local exps = tonumber(getAccountData(pAccount, "exp")) local lvls = tonumber(getAccountData(pAccount, "lvl")) local needexp = lvls * 4 if not exp then setAccountData(pAccount, "exp", 1) setAccountData(pAccount, "allexp", 1) setAccountData(pAccount, "lvl", 1) outputChatBox("Your experience: " .. exps .. "/" .. needexp, pPlayer, 0, 255, 0) else setAccountData(pAccount, "exp", exps + 1) if exps == needexp then setAccountData(pAccount, "lvl", lvls + 1) setAccountData(pAccount, "exp", 1) outputChatBox("Your lvl is up to " .. lvls + 1 .. "!", pPlayer, 0, 255, 0) else outputChatBox("Your experience: " .. exps .. "/" .. needexp, pPlayer, 0, 255, 0) end end triggerClientEvent ( pPlayer, "drawDxText", pPlayer, exps, needexp ) end end setTimer(experience, 3600000, 0) addEventHandler ( "onPlayerLogin", root, function ( _, account ) if ( account ) then local exp = tonumber ( getAccountData ( account, "exp" ) ) local lvl = tonumber ( getAccountData ( account, "lvl" ) ) if ( exp and lvl ) then local needExp = lvl * 4 triggerClientEvent(source, "drawDxText", source, experience, needexp) end end end )
  3. Client text = "" function setText(exp, needexp) text = "Experience: ".. exp .. "/" .. needexp end addEvent("drawDxText", true) addEventHandler("drawDxText", root, setText) function renderText() if (#text > 0) then local sw, sh = guiGetScreenSize() dxDrawText (text, 50, sy-50) end end addEventHandler("onClientRender", root, renderText) Sever function experience () for i, pPlayer in ipairs( getElementsByType( "player" ) ) do local pAccount = getPlayerAccount( pPlayer ) local exp = getAccountData(pAccount, "exp") local exps = tonumber(getAccountData(pAccount, "exp")) local lvls = tonumber(getAccountData(pAccount, "lvl")) local needexp = lvls * 4 if not exp then setAccountData(pAccount, "exp", 1) setAccountData(pAccount, "allexp", 1) setAccountData(pAccount, "lvl", 1) outputChatBox("Your experience: " .. exps .. "/" .. needexp, pPlayer, 0, 255, 0) else setAccountData(pAccount, "exp", exps + 1) if exps == needexp then setAccountData(pAccount, "lvl", lvls + 1) setAccountData(pAccount, "exp", 1) outputChatBox("Your lvl is up to " .. lvls + 1 .. "!", pPlayer, 0, 255, 0) else outputChatBox("Your experience: " .. exps .. "/" .. needexp, pPlayer, 0, 255, 0) end end triggerClientEvent(source, "drawDxText", source, exp, needexp) end end setTimer(experience, 3600000, 0) addEventHandler ( "onPlayerLogin", root, function ( _, paccount ) if ( account ) then local exp = tonumber ( getAccountData ( paccount, "exp" ) ) local lvl = tonumber ( getAccountData ( paccount, "lvl" ) ) if ( exp and lvl ) then local needExp = lvl * 4 triggerClientEvent(source, "drawDxText", source, exp, needexp) end end end )
  4. Doesn't not work. Can you give me a code? Please
  5. Dont show the level and exp
  6. I know that you want to use dxDrawText. But where this function to insert the code?
  7. How to make written under the radar level and exp? Here is the code: function experience () for i, pPlayer in ipairs( getElementsByType( "player" ) ) do local pAccount = getPlayerAccount( pPlayer ) local exp = getAccountData(pAccount, "exp") local exps = tonumber(getAccountData(pAccount, "exp")) local lvls = tonumber(getAccountData(pAccount, "lvl")) local needexp = lvls * 4 if not exp then setAccountData(pAccount, "exp", 1) setAccountData(pAccount, "allexp", 1) setAccountData(pAccount, "lvl", 1) outputChatBox("Your experience: " .. exps .. "/" .. needexp, getRootElement(), 0, 255, 0) else setAccountData(pAccount, "exp", exps + 1) if exps == needexp then setAccountData(pAccount, "lvl", lvls + 1) setAccountData(pAccount, "exp", 1) outputChatBox("Your lvl is up to " .. lvls + 1 .. "!", getRootElement(), 0, 255, 0) else outputChatBox("Your experience: " .. exps .. "/" .. needexp, getRootElement(), 0, 255, 0) end end end end setTimer(experience, 3600000, 0)
  8. lsd1999

    Help Please

    if you is not difficult, you can select where you want to insert the bracket
  9. lsd1999

    Help Please

    [2015-03-23 16:01:47] ERROR: Loading script failed: Drift\server.lua:41: ')' expected (to close '(' at line 2) near 'addEventHandler' What is the error?
  10. lsd1999

    Help Please

    What am I doing wrong? function setHandling() bindKey("k", function() for i, veh in ipairs(getElementsByType("vehicle")) do if getElementModel(veh) == 451 then setVehicleHandling(veh, "mass", 1600) setVehicleHandling(veh, "turnMass", 3921.3) setVehicleHandling(veh, "dragCoeff", 1.8 ) setVehicleHandling(veh, "centerOfMass", { 0, -0.4, 0 } ) setVehicleHandling(veh, "percentSubmerged", 75) setVehicleHandling(veh, "tractionMultiplier", 0.75) setVehicleHandling(veh, "tractionLoss", 0.85) setVehicleHandling(veh, "tractionBias", 0.52) setVehicleHandling(veh, "numberOfGears", 5) setVehicleHandling(veh, "maxVelocity", 200) setVehicleHandling(veh, "engineAcceleration", 8.8 ) setVehicleHandling(veh, "engineInertia", 10) setVehicleHandling(veh, "driveType", "rwd") setVehicleHandling(veh, "engineType", "petrol") setVehicleHandling(veh, "brakeDeceleration", 10) setVehicleHandling(veh, "brakeBias", 0.53) setVehicleHandling(veh, "ABS", 0) setVehicleHandling(veh, "steeringLock", 35) setVehicleHandling(veh, "suspensionForceLevel", 1.3) setVehicleHandling(veh, "suspensionDamping", 0.12) setVehicleHandling(veh, "suspensionHighSpeedDamping", 0) setVehicleHandling(veh, "suspensionUpperLimit", 0.28 ) setVehicleHandling(veh, "suspensionLowerLimit", -0.12) setVehicleHandling(veh, "suspensionFrontRearBias", 0.38 ) setVehicleHandling(veh, "suspensionAntiDiveMultiplier", 0) setVehicleHandling(veh, "seatOffsetDistance", 0.2) setVehicleHandling(veh, "collisionDamageMultiplier", 0.24) setVehicleHandling(veh, "monetary", 25000) setVehicleHandling(veh, "modelFlags", 0x40000000) setVehicleHandling(veh, "handlingFlags", 0x10200008 ) setVehicleHandling(veh, "headLight", 0) setVehicleHandling(veh, "tailLight", 1) setVehicleHandling(veh, "animGroup", 0) end end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), setHandling)
  11. lsd1999

    Help Please

    Thank U. Can you give an example?
  12. lsd1999

    Help Please

    How to make the switch between "drift" and "normal" when you press a button. I understand the need to use a hundred handling. Sorry, my bad English...
×
×
  • Create New...