Jump to content

Mr.Loki

Members
  • Posts

    667
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Mr.Loki

  1. This function is meant for playSound3D
  2. Well you can stream the video from youtube in the browser instead of downloading it.
  3. Mr.Loki

    [HELP] Map

    Can you please explain yourself properly?
  4. Your problem is line 4 accountName = Sopro You used Sopro as a variable and not a string. accountName = "Sopro"
  5. You need to trigger from the server to the client not the other way around. local name = "bailes_fornite" local IFP = engineLoadIFP( "bailes.ifp", name) if not IFP then outputChatBox( "Fallo al cargar el archivo 'bailes.ifp'" ) end function setAnimation(animationName) setPedAnimation(source, name, animationName) end addEvent("onAnim", true) addEventHandler("onAnim", root, setAnimation) function animar(plr, _, animationName) triggerClientEvent("onAnim", plr, animationName) end addCommandHandler("anim", animar)
  6. addEventHandler("onPlayerChangeNick", getRootElement(), function(oldNick, newNick, changedByUser) if changedByUser then -- check if the nickname was changed by the user cancelEvent() end end );
  7. the example on the page shows you how
  8. https://wiki.multitheftauto.com/wiki/SetPedStat
  9. You would need to edit each vehicle you want the shader to work on.
  10. You can cancel the event onPlayerChangeNick the first example on the page shows you how. Use this instead of the above code. function giveRandomName( ) local newName -- Create a variable to store the name that is only visible within the function. repeat newName = math.random(1000,9999) -- Generate random number. until not getPlayerFromName( "Guess_"..newName ) -- Repeat the line above until if player with this name is found. setPlayerName( source, "Guess_"..tostring(newName) ) -- Give the player the new name. end addEventHandler( "onPlayerJoin", root, giveRandomName ) function Restorenick( _, acc ) local accountName = getAccountname(acc) -- get the name of the account they logged in with setPlayerName( source, accountName ) -- Set the player's name to his account name. end addEventHandler( "onPlayerLogin", root, Restorenick )
  11. What function did you use to hash the password? You should use passwordHash and passwordVerify
  12. Not sure what you meant but here u go. local names = {} -- Create a tabe to save names when they join function GuessShodan( ) names[source] = getPlayerName( source ) -- Save the player's name in the table. giveRandomName( source ) -- Call our custom function to generate a random name and give it to the player. end addEventHandler( "onPlayerJoin", root, GuessShodan ) function giveRandomName( plr ) local newName -- Create a variable to store the name that is only visible within the function. repeat newName = math.random(1000,9999) -- Generate random number until not getPlayerFromName( "Guess_"..newName ) -- repeat the line above until no player with this name is found in the server setPlayerName( plr, "Guess_"..tostring(newName) ) -- Give the player the new name end function Restorenick( ) if names[source] then -- Check if the player is in the table setPlayerName( source, names[source] ) -- Set the player's name to the nick he had when joining names[source] = nil -- Remove the name from the table end end addEventHandler( "onPlayerLogin", root, Restorenick )
  13. onPlayerDamage check if damage type is 63(blown vehicle) KillPed
  14. URGENT New patch released (ver 2.0.1) (Sep. 5, 2018) This version fixes a bug that was caused by the API Fixed a bug that caused video playback to pause at the start. Download the latest version here! If you find any more bugs, please report them to us so we can fix them as soon as possible.
  15. This is the English section of the forum. https://forum.multitheftauto.com/forum/97-portuguese-português/
  16. Can you explain better what you're trying to accomplish?
  17. engineLoadIFP has already been added as of 1.5.5 r12195 and is available in-game. The current latest version as of now is 1.5.5 r12411
  18. The first function parameter in onPlayerConnect is the player's name just check that instead of using getPlayerName
  19. Simple class template: -- Create Class local Class = {} Class.__index = Class function Class.new() local self = setmetatable({ },Class) return self end setmetatable(Class, {__call = function( _,... ) return Class.new(...) end }) -- Add method to class function Class:doStuff(stuff) self.var = stuff end
  20. Can you login and post a picture of the admin panel please.
  21. the example on this page has exactly what you are looking for. https://wiki.multitheftauto.com/wiki/RespawnVehicle
  22. The guy above me already gave you an answer. I don't help people who can't make an effort to help themselves(Unless you pay me ofcourse). Also Do not hijack threads you can get your account removed.
×
×
  • Create New...