-
Posts
282 -
Joined
-
Last visited
Everything posted by Gordon_G
-
No prob. Use /debugscript 3 when u will test the script.
-
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
-
you could just disable player damages when he enters inside the train, and enable them when he gets out
-
@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.
-
Oh, yes, I was wrong. I've written that because I added the event "onClientObjectDamage" by triggering from server.
-
Attempt to compare number with boolean [HELP PLS]
Gordon_G replied to Tibi [NextMTA]'s topic in Scripting
If it's a leaked script, the MTA community will not help him. -
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
-
What - The - :O ? Please explain correctly what do you want to make ? How could we help you ?
-
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
-
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 !
-
I don't understand, why findRotation is not good ? It works perfectly.
-
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
-
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)
-
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.
-
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)
-
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)
-
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.
-
https://wiki.multitheftauto.com/wiki/OnElementClicked https://wiki.multitheftauto.com/wiki/MoveObject
-
@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.
-
Is this possible to remove a string from a file ?
-
Hello, Is it possible to have a label with multiple color ?
-
dbPoll (query, -1) Try this.
-
That's so sad, I'll do it manually