Jump to content

MIKI785

Members
  • Posts

    1,131
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by MIKI785

  1. I don't know, maybe it has something to do with sync? Try putting it in a timer to have it execute with a bit of a delay after creating the vehicle.
  2. But you have it under if rank >= 2 then, so how can that work? Isn't it supposed to be for the first player? Ie. rank 1? There's another case where that event is triggered, so try it there: function DestructionDerby:handleFinishActivePlayer(player) local timePassed = self:getTimePassed() local rank = self:getPlayerRank(player) if rank >= 2 then triggerClientEvent("winnerMessage",resourceRoot,"Winner!!!", getPlayerNametagText(player)) triggerEvent("plusz1", player) end finishActivePlayer(player) if rank and rank > 1 then triggerEvent( "onPlayerFinishDD",player,tonumber( rank ) ) end local activePlayers = getActivePlayers() triggerEvent("onPlayerDeadInRace",getRootElement(),rank,player) if #activePlayers == 1 then if (not isMapDM()) then if getResourceState( getResourceFromName( "podium" )) ~= "running" then triggerClientEvent("winnerMessage",resourceRoot,"Winner!!!", getPlayerNametagText(activePlayers[1])) triggerEvent("plusz1", activePlayers[1]) --Here else triggerClientEvent("winnerMessage",resourceRoot,"","") setElementHealth(activePlayers[1],0) end end if getElementModel(getPedOccupiedVehicle(activePlayers[1])) == 425 then setElementHealth(activePlayers[1],0) end triggerEvent( "onPlayerWinDD",activePlayers[1] ) end end
  3. Put it wherever winnerMessage is, since that knows who the player is as it supplies the player's name.
  4. It's just wrong, I suppose that winnerMessage gets triggered for everyone, right? So then everyone triggers plusz1, you're checking for getPlayerRank but I can't see how does that work. But it makes no sense to go from server to client and then back to the server.. you should add the points and money wherever winnerMessage is initially triggered.
  5. This is a script related issue, nothing to do with the server itself. You should have posted this here: https://forum.multitheftauto.com/forum/71-scripting/
  6. So this function is triggered by an event? Because that works fine for me... Code i've used: Server: addCommandHandler("gvc", function (player) triggerClientEvent(player, "onClientGetVehicleComp", player, getPedOccupiedVehicle(player)) end) Client: addEvent("onClientGetVehicleComp", true) addEventHandler("onClientGetVehicleComp", localPlayer, function (veh) outputChatBox(tostring(getElementModel(veh))) local getComponent = getVehicleComponents(veh) if veh then for k in pairs(getComponent) do outputChatBox(k) end end end)
  7. How do you apply the shader?
  8. It did find it but it is modified. Maybe try a clean version of the game?
  9. Yes, use dxGetTexturePixels on s and then dxConvertPixels to get png/jpg data and then save it using for example fileWrite.
  10. No, that's not what this section is intended for. You're supposed to try it, post your code if it doesn't work, describe what's wrong and then we can try and help you with it. You won't learn otherwise if you just copy & paste.
  11. So you don't want it as a command but have it called upon a click instead? See onClientClick for that.
  12. You cant use loadMapData for this, its more complicated than that. loadMapData loads a map file onto the server, meaning that indeed all players will get those elements. You have to do this client sided, you have to make your own client sided version of 'loadMapData'.
  13. MIKI785

    /me script

    That's to remove the command. There is no script for it as it is hard-coded into mta server.
  14. Well... source is root, you can't possibly get the position of the root element, has to be an entity, The other thing is that channelTable[channelTable[path]] evaluates to nil, can't see any of those variables anywhere in your snippet.
  15. This command was removed; https://github.com/multitheftauto/mtasa-blue/commit/0cffa9215f4601e42b2dfbc254040aeda3caa8f0.
  16. So is it a single script (lua file) or a whole resource? You can't 'install' a single script, it has to be a part of a resource. If it's a whole resource, then just put it in the /mods/deathmatch/resources directory and use the command 'refresh' on your server or in the server console. You can then start the resource using the 'start <resourceName>' command.
  17. He does that and there will be another topic in 5 minutes that he's got a black screen after connecting. There is a file in resources "[gamemodes]/[play]/play/broph.lua", right at the top is a table of vehicles to spawn. You can remove/add vehicles there. If you don't want any vehicles to spawn replace it with an empty table: local vehiclesToSpawn = {} Don't just delete the table as it is referenced later in the code.
  18. It says it on the wiki: "Returns true if the password matches the hash. Returns false if the password does not match, or if an unknown hash was passed. If a callback was provided, the aforementioned values are arguments to the callback, and this function will always return true." So, yes.
  19. MIKI785

    Raw data

    There already is a PR for the shader creation, see here: https://github.com/multitheftauto/mtasa-blue/pull/441. So it could be implemented soon.
  20. AC #4 means that a trainer was detected and you were kicked from the server automatically. Make sure that no other program is modifying MTA in any way.
  21. It's a special detection enabled by the server, the description on the wiki says: "Disallow disabled anti-cheat components. This is triggered when an anti-cheat component can not start. It is usually due to some problem with the PC and might be fixed by a reboot. Can also be triggered by a virus.".
  22. MIKI785

    Spawn Kill

    I think he means that he wants to be immortal 30 seconds after spawning (taken from the subject). See onClientPlayerSpawn and onClientPlayerDamage.
  23. Use getPlayerPosition and pass the returned values to playSound3D
×
×
  • Create New...