-
Posts
49 -
Joined
-
Last visited
-
Days Won
2
Everything posted by WWW
-
local spawn = createMarker(0, 0, 0, "cylinder", 1, 255, 255, 255, 255) addEventHandler("onMarkerHit", spawn, function(element) if getElementType(element) == "player" then if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(element)), aclGetGroup("SAMU")) then setElementModel(element, 274) end end end) addEventHandler("onMarkerHit", spawn, function(element) if getElementType(element) == "player" then if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(element)), aclGetGroup("PM")) then setElementModel(element, 280) end end end)
-
Coloque o código abaixo em servidor: local spawn = createMarker(0, 0, 0, "cylinder", 1, 255, 255, 255, 255) addEventHandler("onMarkerHit", spawn, function(element) if getElementType(element) == "player" then if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(element)), aclGetGroup("SAMU")) then if getPedOccupiedVehicle(element) == false then local x, y, z = getElementPosition(element) local v = createVehicle(551, x, y, z) warpPedIntoVehicle(element, v) end end end end) addEventHandler("onMarkerHit", spawn, function(element) if getElementType(element) == "player" then if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(element)), aclGetGroup("PM")) then if getPedOccupiedVehicle(element) == false then local x, y, z = getElementPosition(element) local v = createVehicle(551, x, y, z) warpPedIntoVehicle(element, v) end end end end)
-
You should use client instead of source in the addEventHandler.
-
Cliente: addEventHandler("onClientPlayerDamage", root, function() if bodypart == 9 then setElementHealth(source, getElementHealth(source) - 30) end end Meta: <meta> <script src="client.lua" type="client" /> </meta>
-
Crie um recurso com o código abaixo em cliente, desative o recurso headshot também. addEventHandler("onClientPlayerDamage", root, function(attacker, damage_causing, bodypart, loss) if bodypart == 9 then setElementHealth(source, getElementHealth(source) - 30) end end
-
addEventHandler("onClientPlayerDamage", root, function(attacker, damage_causing, bodypart, loss) if bodypart == 9 then cancelEvent() setElementHealth(source, getElementHealth(source) - 30) end end
-
Client: addEventHandler("onClientChatMessage", root, function() if getElementData(source, "chat") == "local" then if source ~= getLocalPlayer() then cancelEvent() end end end) Server: setElementData(player, "chat", "local") setElementData(player, "chat", "everyone")
-
You have to select the message, then cancel the event.
-
We have this event on client. https://wiki.multitheftauto.com/wiki/OnClientChatMessage
-
You should reinstall the server, I use this link below. https://nightly.multitheftauto.com/mtasa_x64-1.6-rc-22410-20240301.exe
-
say Como remover o Chat Nativo do MTA para usar um chat local
WWW replied to leaodon's topic in Programação em Lua
Uma solução é desativar o console. addEventHandler("onClientKey", root, function(button, pressOrRelease) if button == "F8" then cancelEvent() end end -
say Como remover o Chat Nativo do MTA para usar um chat local
WWW replied to leaodon's topic in Programação em Lua
Conforme comentado no tópico abaixo, não tem como desativar um comando do cliente. https://forum.multitheftauto.com/topic/73065-question/ -
Add a larger column to the database: VARCHAR(64)
- 15 replies
-
- 1
-
if sha256(pass) == result[1]["password"] then print("Sikeres bejelentkezés!") else print("Hibás jelszó!") end
- 15 replies
-
https://wiki.multitheftauto.com/wiki/CreateColCuboid
-
getAccountsBySerial(serial)
-
We have these buttons: escape backspace tab lalt ralt enter space pgup pgdn end home insert delete lshift rshift lctrl rctrl [ ] pause capslock scroll ; , - . / # \ =
-
The accepted keys: https://wiki.multitheftauto.com/wiki/Key_names
-
dbExec(connection,"UPDATE interiors SET megujitva = CURRENT_TIMESTAMP(6) WHERE id = ?",idd)
-
Can you show the database structure?
-
Yes.
- 15 replies
-
- 1
-
Sha256 is good enough. Don't use md5.
- 15 replies
-
The system uses sha384.
- 15 replies
-
Use this function: sha256(password)
- 15 replies