Jump to content

KariiiM

Members
  • Posts

    1,312
  • Joined

  • Last visited

Everything posted by KariiiM

  1. KariiiM

    logIn

    You're welcome.
  2. KariiiM

    logIn

    -- server side: function LoginBTN ( acc, pw ) local account = getAccount ( acc, pw ) if ( account ) then if logIn ( source, account, pw ) then outputChatBox ( "Exsiting", source) spawnPlayer ( source, -2172.79419, 500.00000, 35.17188 ) fadeCamera ( source, true ) setCameraTarget ( source, source) triggerClientEvent ( source, "hide", source) end else outputChatBox ( "Not Exsiting", source) end end addEvent ( "login", true ) addEventHandler ( "login", root, LoginBTN ) -- client side: function btns ( ) if ( source == Login_btn ) then triggerServerEvent ( "login", localPlayer, guiGetText ( email_txt ), guiGetText ( password_txt ) ) end end addEventHandler ( "onClientGUIClick", guiRoot, btns )
  3. triggerServerEvent function will do the job and put addEvent function in the server side to register the event, then add your event handler.
  4. And logically the server has no keyboard to type on it
  5. I do it like that, bindKey ( "w", "down", function ( ) if getKeyState ( "space" ) then -- your code end end ) bindKey ( "space", "down", function ( ) if getKeyState ( "w" ) then -- your code end end )
  6. Just be sure the second file is declared in the meta.xml, that's all. local SmallTest = createColRectangle ( 1982, -2574, 60, 60 ) function isObjectWithinCityZone ( object ) if ( object and not getElementType ( object ) == "object" ) then return false end if isElementWithinColShape ( object, SmallTest ) then return true end end Second code: function CSTmapEditorMouseClick ( button, state, el, wX, wY, wZ ) local object = createObject ( model, wX, wY, wZ ) if isElement ( object ) then if ( not isObjectWithinCityZone ( object ) ) then destroyElement ( object ) end end end
  7. Explain your problem in the spanish section: https://forum.multitheftauto.com/viewforum.php?f=145
  8. KariiiM

    Oxygen

    local LoadOxygen = createPickup(-1890.1999511719, 2145.1000976563, 1.7999999523163, 3, 2690, 2000) local clothes = createPickup(-1886.7001953125, 2142.7001953125, 1.7999999523163, 3, 1275, 2000) function DiverJob(hitElement) local skin = getElementModel(localPlayer) if ( skin == 97 ) then local CurrentSkin = getElementData(localPlayer, "CurrentSkin") setElementModel(localPlayer, CurrentSkin) outputChatBox("Finished working diver.", localplayer) else setElementData(localPlayer, "CurrentSkin", skin, false) setElementModel(localPlayer, 97) outputChatBox("I started working diver", localplayer) end end addEventHandler("onClientPickupHit", clothes, DiverJob) setTimer(function() for k,v in ipairs(getElementsByType("player")) do if getElementModel(v) ~= 97 and isElementInWater(v) then return end local oxygen = getPedOxygenLevel(v) if isElementInWater(v) then setPedOxygenLevel(v, oxygen-1) end end end, 300000, 0) addEventHandler("onClientPickupHit", LoadOxygen, function(element) for k, v in ipairs(getElementsByType("player")) do if getElementModel(v) ~= 97 and not isElementInWater(v) then return end if element ~= localPlayer then return end setPedOxygenLevel(v, 100) end end )
  9. KariiiM

    Oxygen

    @Dimos, this line will output an error, you added a comma after the function setTimer(function(),
  10. KariiiM

    [HELP] Hud

    lol, I didn't take attention about this line if not getPedWeapon (getLocalPlayer()) == 0, 1 then it will return an error
  11. KariiiM

    [HELP] Hud

    He said: that's why we need to know the known errors
  12. KariiiM

    [HELP]Bug

    I have no idea about this game mode, if you stuck go ahead and ask the developers who created this.
  13. Yeah it's a good idea, and use getVehicleController to return the vehicle controller, since the source of this event is the vehicle.
  14. KariiiM

    [HELP]Bug

    Check the meta.xml and be sure that the function sekectSkinFromStore is declared as an exported function.
  15. KariiiM

    [HELP]Bug

    The code is failed to call the function sekectSkinFromStore of GIclothes resource, be sure this GIclothes is running.
  16. KariiiM

    [HELP] Hud

    Any error / warning in your debugscript ?
  17. What Alex said is true, as I told you there's no limit for JSON at all, but if you stored into it a large amount of data, to be saved into your database for example it will take more RAM memories to be handled, and still JavaScript Object Notation ( JSON ) has no limit specified, it's up to your server RAM too.
×
×
  • Create New...