Gordon_G

Members
  • Content Count

    255
  • Joined

  • Last visited

Everything posted by Gordon_G

  1. 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
  2. you could just disable player damages when he enters inside the train, and enable them when he gets out
  3. @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.
  4. Oh, yes, I was wrong. I've written that because I added the event "onClientObjectDamage" by triggering from server.
  5. If it's a leaked script, the MTA community will not help him.
  6. 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
  7. What - The - :O ? Please explain correctly what do you want to make ? How could we help you ?
  8. 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
  9. 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 !
  10. I don't understand, why findRotation is not good ? It works perfectly.
  11. 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
  12. 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)
  13. 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.
  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)
  15. 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)
  16. 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.
  17. https://wiki.multitheftauto.com/wiki/OnElementClicked https://wiki.multitheftauto.com/wiki/MoveObject
  18. @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.
  19. Is this possible to remove a string from a file ?
  20. Hello, Is it possible to have a label with multiple color ?
  21. dbPoll (query, -1) Try this.
  22. That's so sad, I'll do it manually
  23. I know this'll work but, I'll need to do this for all my guiFunc's I would like to be faster