Gordon_G

Members
  • Content Count

    261
  • Joined

  • Last visited

Everything posted by Gordon_G

  1. Then, juste trigger the function bindKey clientside from serverside when the player login onPlayerLogin triggerClientEvent
  2. Duplicate weapon ? Huh, you want to say create new weapons ? If it is that, yes it's possible. It'll need some script however. Look at these functions, it could help you : https://wiki.multitheftauto.com/wiki/Server_Scripting_Functions#Weapon_functions good luck.
  3. Gordon_G

    setInterior

    oh yes, I forgot, but intID is originally a string and not a number ^^ Thanks @pa3ck
  4. Gordon_G

    setInterior

    You define interiors two times, once in the function, and once for the table. Replace the function by this : addCommandHandler("setin",function(player,cmd,intID) if interiors then local int,x,y,z = interiors[intID][1],interiors[intID][2],interiors[intID][3],interiors[intID][4] setElementInterior(player,int,x,y,z) else outputChatBox(syntax.." /"..cmd.." [InteriorID]",player,255,255,255,true) end end)
  5. @LopSided_ yes, I've never tested like this me too. But it's not his problem as I see. @CodX have you added it client side ?
  6. No prob. Use /debugscript 3 when u will test the script.
  7. 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
  8. you could just disable player damages when he enters inside the train, and enable them when he gets out
  9. @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.
  10. Oh, yes, I was wrong. I've written that because I added the event "onClientObjectDamage" by triggering from server.
  11. If it's a leaked script, the MTA community will not help him.
  12. 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
  13. What - The - :O ? Please explain correctly what do you want to make ? How could we help you ?
  14. 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
  15. 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 !
  16. I don't understand, why findRotation is not good ? It works perfectly.
  17. 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
  18. 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)
  19. 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.
  20. 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)
  21. 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)
  22. 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.
  23. https://wiki.multitheftauto.com/wiki/OnElementClicked https://wiki.multitheftauto.com/wiki/MoveObject