-
Posts
342 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Doongogar
-
you could create a marker, or a col shape and add the event onMarkerLeave or onColShapeLeave and set the position of the ped with setElementPosition to where it was
-
I don't know if you modified the files, but if you have, I suggest you reinstall the files because it doesn't exist in the original meta and neither does the 'Burgersdot' folder
-
Wrap EVERYTHING files in a folder, the name of this folder will be the name of the resource. text translated by google translator, sorry if something is wrong
-
i recommend this: function MessageByCommand(thePlayer) outputChatBox("#F4E607[VIP] #FFFFFF/vskin 1, /vskin 2, /vskin 3, /vskin 4", thePlayer, 244, 230, 7, true) end addCommandHandler("vskins", MessageByCommand) because when you use the onClientPlayerCommand or the onPlayerCommand the script detects all the commands and even messages in the chat and to filter them out if they are "vskins" this is not very optimized, even if the amount of optimization doesn't change the code that much it makes more sense to me since it doesn't detect each command and message and filters them, but if the player executes the command "vskins" it sends a message in the chat Note: I think there is no onClientPlayerCommand event, only onPlayerCommand, I just didn't find it on the wiki, but I'm not sure
-
for this you can use the onPlayerDamage event checking if the cause of the damage is a weapon, and then filter just for the player to run an animation to be sure of firearms, and then have the source(source of the event) execute the desired animation and remember to write in english outside any language forum specified
-
por favor poderia me ajudar com duas questoes?
Doongogar replied to lima's topic in Programação em Lua
mostre o código -
[DUVIDA] diferença de com ou sem parenteses
Doongogar replied to Doongogar's topic in Programação em Lua
eu não entendi muito bem, teria como explicar sem valores ou números e sim com situações do próprio mta? -
you can get the pilot with getVehicleOccupant function and check if it exists an example that maybe can help you function VehicleHealth(attacker, weapon, loss) local HealthOfVehicle = getElementHealth(source) local driver = getVehicleOccupant(source) if driver then outputChatBox("life before the crash: "..math.floor(HealthOfVehicle)) outputChatBox("life after the crash: "..math.floor(HealthOfVehicle - loss)) outputChatBox("damage taken: "..math.floor(loss)) end end addEventHandler("onClientVehicleDamage", root, VehicleHealth)
-
onPedWasted or onClientPedWasted
- 2 replies
-
- bots
- onbotwasted
-
(and 2 more)
Tagged with:
-
onVehicleDamage getElementHealth
-
eu queria saber qual a diferença de uma linha com ou sem parenteses, geralmente eu uso sem por não saber como usar ou para que usar darei exemplos: addEventHandler("onPlayerVehicleEnter", root, function(veh, seat) if getElementModel(veh) == 540 then -- sem parenteses print("oi") end end) addEventHandler("onPlayerVehicleEnter", root, function(veh, seat) if (getElementModel(veh) == 540) then -- com parenteses print("oi") end end)
-
se é um código no server não se usa localPlayer, as aspas do outputChatBox estão erradas tente assim: function versujis(player) local Dinheiro__Sujo = getElementData(player, "TS:sujo") or 0 outputChatBox("[info] R$"..Dinheiro__Sujo, player, 255, 255, 255, true) end addCommandHandler("versujo", versujis)
-
here you are determining the state of the clicked button, but you are not determining which button clicked will perform the action, you have 3 click options (right, left and middle) here's an example with the left button: addEventHandler("onClientClick", getRootElement(), function(button, state) if button == "left" and state == "down" then injectBrowserMouseDown(webBrowser, button) else injectBrowserMouseUp(webBrowser, button) end end)
-
https://imgur.com/a/IJNFKxM you would just change false to true, it would look like this: setPedAnimation(localPlayer, "parkour", "CartWheel", -1, true, false, false, true)
-
set the fifth argument of the setPedAnimation function to true, this determines whether the animation will loop or not. this may not work as some animations are not meant to run while the ped is moving
-
ForumDrawDistanceResource this is a topic from a forum moderator who posted this resource that helps rendering maps, there are discussions about the resource's functionality and side effects, you could test it yourself to see if you like it
-
https://imgur.com/a/0TSHcdz maybe that's it, try putting the vehicle's alpha at 150 for a test, and see if the wheels are transparent
-
porque existem algumas ruas ou partes de ruas aonde automaticamente os veiculos são impedidos de alcançarem sua velocidade máxima? eu percebi que naquela principal aonde tem o hospital de cor branca qualquer veiculo é impedido de alcançar a velocidade máxima gostaria de saber o porque disso.
-
como assim universal, poderia me explicar isso? eu também queria saber um meio de solicitação para multiplos players, exemplo eu dou /mecanico e então o mecanico pode aceitar meu chamado digitando /aceitar, porém com uma condição que ele só consiga aceitar dentro do prazo de expiração e caso nenhum outro mecanico ja tenha aceitado o chamado. @Lord Henry Teria como mudar novamente o titulo, o que eu queria escrever era: "Sistema de solicitação com expiração".
-
Verificar se elemento possui element data
Doongogar replied to Doongogar's topic in Programação em Lua
muito bom, porém eu arrumei outra solução para meu problema eu que fui bem leigo. Se quiser ja pode fechar este tópico -
bom, neste caso você não implementou nada em que questão de solicitação mesmo, eu estou mais em dúvida sobre a questão do player solicitado aceitar ou rejeitar sabe como eu verifico se ele realmente tem algo pendente para ele poder rejeitar ou aceitar
-
Projetar chat em tempo real em um painel
Doongogar replied to Doongogar's topic in Programação em Lua
não teria como fazer isso sem ser por meio das bindkeys dos chats? -
como eu faço um sistema de solicitação? Exemplo eu mando uma solicitação de troca skin pro player e então ele tem que aceitar ou rejeitar para ser setado a skin nele caso passe 5 minutos sem respostas, expire esta solicitação que eu mandei a ele, antes de enviar a solicitiação ao player também verificar se ele já não tem solicitações pendentes
-
tem como eu projetar o chat em tempo real em algum painel, sem ser um sistema de historico, ou logs, se possivel, mas se so tiver como um sistema de historico pode ser também e também fazer algumas modificações no chat do painel em relação ao chat normal, exemplo no chat normal aparece id's no painel aparece somente os nomes