Jump to content

Mr.Loki

Members
  • Posts

    667
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Mr.Loki

  1. Mr.Loki

    Lock DFF Error

    this model was made for replacing the default weapon models not sure it would work with replacing other models
  2. Mr.Loki

    Lock DFF Error

    Can you give a link to where you downloaded the dff?
  3. Mr.Loki

    Lock DFF Error

    Can you explain better of what you're trying to do? If it's an ID problem then you can use this to get object IDs that aren't used so replaced objects aren't overlapped in your code.
  4. dxCreateTexture dxDrawMaterialLine3D onClientPreRender createColSphere onColShapeHit
  5. OnClientVehicleCollision can tell you the part.
  6. Mr.Loki

    help

    GetPedOccupiedVehicle RemovePedFromVehicle SetElementPosition In that order.
  7. oh I converted it to lua code mybad
  8. onPlayerLogin is a server event. playSound is a client event. You will need to trigger an event to the client to play the sound.
  9. theTechnique = dxCreateShader( "type1.fx", 0, 0, true )-- you need to set layered as true
  10. This can also be caused when your client runs out of vmemory. make sure that you are cleaning up unused fonts, textures, render targets and shaders properly. To check your client memory use the /showmemstat command. Spam a few Windows and check to see if it depletes your memory each time it's opened. If the FreeForMTA number is too low functions like these stop working.
  11. Mr.Loki

    Jail Bug

    When the player quits onPlayerQuit, check if they were in jail then set the jail data to their account setAccountData so when they log in again onPlayerLogin just get the jail data from their account getAccountData and jail them with the account data.
  12. You should check the wiki ? SetHeliBladeCollisionsEnabled.
  13. You put the plant in the plants table so all that you need to do now is to use the client to reference the plant in the table. function plantDestroy ( ) destroyElement ( plants[client] ) plants[client] = nil -- remove the entry from the table end addEvent ("onDestroyElement", true) addEventHandler ("onDestroyElement", getRootElement(), plantDestroy)
  14. for the speed GetElementSpeed this is a custom function so you need to copy it to your code. for the model GetElementModel
  15. You need to use a shader to accomplish this.
  16. function firstscript (player) if getElementData(player, "Job") ~= "CIA" then if not getElementData(player, "Clan") or getElementData(player, "Clan") == "None" then exports.Messages:sendClientMessage( "You Have to be part in gang for take it ",player, 255, 0, 0) return end end end
  17. Another simpler way is creating a ternary operator. For example: argument3 = tonumber(argument3) and argument3 or getElementDimension(player) -- what this does is if arg3 is a number use it else it sets arg3 as the player's dimension no need for else, if etc...
  18. You can find all of the ped names from within the freeroam resource in skins.xml
  19. in your escolhaJanelaArmas() function change resourceRoot in the triggerServerEvent function to localPlayer. Then in your server code the "source" will be your player. function darArmaClient(textoIDArma) outputChatBox("Ola" ..textoIDArma, getPlayerName(source)) nomeA = getWeaponNameFromID(textoIDArma) outputChatBox(nomeA) giveWeapon(source, textoIDArma, 999) outputChatBox("Erro") end addEvent("darArmaClient", true) addEventHandler("darArmaClient", root, darArmaClient)
  20. You need to change "param" into a table to catch all other subsequent params by using "..." then using table.concat to join them. -- Test the function function test(player, command, ...) local msg = table.concat({...}," ") sendDiscordMessage(msg) end addCommandHandler("dcmessage", test)
  21. createEffect -- for the smoke and sparks fadeCamera/dxDrawRectangle -- for the white flash setTime -- to change the server's time setWeather -- optional weather
  22. It looks like 1 of the old days gamemodes which gets bugged easily by spawning vehicles outside of the gamemode. rip ?
  23. It really depends on the system it's running on and imo I'd say go full CEF. Also CEF won't affect your Game's FPS but DX functions will.
  24. For this you can use onClientPlayerDamage event to check the player's health each time they take damage. Something like this function camShake ( attacker, weapon, bodypart, loss ) local health = getElementHealth( localPlayer ) -- get the player's health -- check health -- set shake etc... end addEventHandler ( "onClientPlayerDamage", localPlayer, camShake )
×
×
  • Create New...