Jump to content

Gordon_G

Members
  • Posts

    282
  • Joined

  • Last visited

Everything posted by Gordon_G

  1. No prob. Use /debugscript 3 when u will test the script.
  2. You could try this : addEventHandler("onClientVehicleEnter", root, function (thePlayer) if thePlayer == localPlayer then local model = getElementModel(source) if model == 538 or model == 570 or model == 537 then addEventHandler("onClientPlayerDamage", localPlayer, function() cancelEvent() end ) end end end ) addEventHandler("onClientVehicleExit", root, function (thePlayer) if thePlayer == localPlayer then local model = getElementModel(source) if model == 538 or model == 570 or model == 537 then removeEventHandler("onClientPlayerDamage", localPlayer, function() cancelEvent() end ) end end end ) It should work
  3. you could just disable player damages when he enters inside the train, and enable them when he gets out
  4. @Pirulax good try but it'll never work. getElementsByType("object") and not getElementByType("objects") will only return objects created from createObject(). I don't think that kind of function exists, sorry.
  5. Oh, yes, I was wrong. I've written that because I added the event "onClientObjectDamage" by triggering from server.
  6. If it's a leaked script, the MTA community will not help him.
  7. function outputLoss(loss, attaker) if getPedWeapon ( localPlayer ) == 0 and getElementType ( source ) == "object" and getElementModel ( source ) == 1985 then --action end end addEventHandler("onClientObjectDamage", localPlayer, outputLoss) Try this
  8. What - The - :O ? Please explain correctly what do you want to make ? How could we help you ?
  9. As @MaK$iM said, there is only the getRealTime() func. You can for exemple do this : - Save the last payday with an account data - Loop a timer to check every X minutes to check if the day changed and then give the payday
  10. Je vais t'aider étant donné que j'ai moi-même appris l'utilisation des shaders sur ce forum. ça devrait t'aider, étant donné que j'ai tout appris uniquement grâce aux réponses des utilisateurs sur ce topic. Bonne chance !
  11. I don't understand, why findRotation is not good ? It works perfectly.
  12. local names = { ["Admin"] = "Tulajdonos", ["Moderator"] = "Moderátor" } function adminuzi(thePlayer, commandName, ...) for i,v in pairs(getElementsByType( "player" )) do for group, serverGroupName in pairs( names ) do if isGuestAccount( getPlayerAccount( v ) ) then return end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup( group ) then local message = table.concat({...}, " ") outputChatBox("#0088FF["..serverGroupName.."]#d8001f "..getPlayerName(v)..":"..message,getRootElement(),0,0,0,true) break end end end end addCommandHandler("asay", adminuzi) Juste the thing I gave you, but "break" will stop the "for" loop. It should'nt spam anymore @50cent
  13. Oh, okey, i'll change that. local names = { ["Admin"] = "Tulajdonos", ["Moderator"] = "Moderátor" } function adminuzi(thePlayer, commandName, ...) for i,v in pairs(getElementsByType( "player" )) do for group, serverGroupName in pairs( names ) do if isGuestAccount( getPlayerAccount( v ) ) then return end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup( group ) then local message = table.concat({...}, " ") outputChatBox("#0088FF["..serverGroupName.."]#d8001f "..getPlayerName(v)..": "..message,getRootElement(),0,0,0,true) end end end end addCommandHandler("asay", adminuzi)
  14. local names = { ["Admin"] = "Tulajdonos", ["Moderator"] = "Moderátor" } function adminuzi(thePlayer, commandName, ...) for i,v in pairs(getElementsByType( "player" )) do for group, _ in pairs( names ) do if isGuestAccount( getPlayerAccount( v ) ) then return end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup( group ) then local message = table.concat({...}, " ") outputChatBox("#0088FF["..group.."]#d8001f "..getPlayerName(v)..": "..message,getRootElement(),0,0,0,true) end end end end addCommandHandler("asay", adminuzi) It should work now.
  15. local names = { ["Admin"] = "Tulajdonos", ["Moderator"] = "Moderátor" } function adminuzi(thePlayer, commandName, ...) for i,v in pairs(getElementsByType( "player" )) do for group, _ in pairs( names ) do if isGuestAccount( getPlayerAccount( v ) ) then return end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer), aclGetGroup( group )) then local message = table.concat({...}, " ") outputChatBox("#0088FF["..group.."]#d8001f "..getPlayerName(v)..": "..message,getRootElement(),0,0,0,true) end end end end addCommandHandler("asay", adminuzi)
  16. local names = { ["Admin"] = "Tulajdonos", ["Moderator"] = "Moderátor" } local players = {} function adminuzi(thePlayer, commandName, ...) for i,v in pairs(aclGroupList()) do if isGuestAccount( getPlayerAccount( v ) ) then return end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer), aclGetGroup( v )) then players[thePlayer] = aclGroupGetName(v) end end local message = table.concat({...}, " ") outputChatBox("#0088FF["..players[thePlayer].."]#d8001f "..getPlayerName(thePlayer)..": "..message,getRootElement(),0,0,0,true) end addCommandHandler("asay", adminuzi)
  17. U will need a badass scripter, no one will do everything free I think. You can learn to script here : https://wiki.multitheftauto.com/wiki/Scripting_Introduction but you will need a lot of knowledge to do everything.
  18. https://wiki.multitheftauto.com/wiki/OnElementClicked https://wiki.multitheftauto.com/wiki/MoveObject
  19. @Hale Sorry, you're right, I hav'nt explained this very good. So, for exemple I've file 'something.txt', and in this file I've this : "I like donuts", and, I would like to remove 'I ' from this string. So, I can use string.gsub, yes, but, how to set it to the file ? 'Cause fileWrite can only add a string to a file, it can't replace it.
  20. Is this possible to remove a string from a file ?
  21. Hello, Is it possible to have a label with multiple color ?
  22. That's so sad, I'll do it manually
×
×
  • Create New...