
function learnLua
Members-
Content Count
8 -
Joined
-
Last visited
Community Reputation
1 NeutralAbout function learnLua
-
Rank
Newbie
-
Eu gostaria que quando o player digitasse o comando /190 marcasse ele no mapa apenas para quem esta na ACL grupo, porém ainda não sei usar dois parâmetros em uma função. function ligar (policia) if isObjectInACLGroup (policia, grupo) == true then createBlipAttachedTo(source, 30, 2) end end addCommandHandler("190", ligar)
-
Alguém aí me ajuda ? Os Bots spawna, porém não me atacam DEBUG: Alien1 = {} Alien2 = {} Alien3 = {} function usarDroga (localPlayer) local x, y, z = getElementPosition(getLocalPlayer()) Alien1[localPlayer] = createPed(111, x+13, y+5, z) Alien2[localPlayer] = createPed(112, x+10, y+3, z) Alien3[localPlayer] = createPed(113, x+6, y+5, z) exports.slothbot:spawnBot(x, y, z, 1, Alien1[localPlayer], 0, 0, a, 0, "chasing", localPlayer) exports.slothbot:spawnBot(x, y, z, 1, Alien2[localPlayer], 0, 0, a, 0, "chasing", localPlayer) exports.slothbot:spawnBot(x, y, z, 1, Alien3[localPlayer], 0, 0, a, 0, "chasing", localPlayer) exports.slothbot:setBotAttackEnabled(Alien1[localPlayer], true) exports.slothbot:setBotAttackEnabled(Alien2[localPlayer], true) exports.slothbot:setBotAttackEnabled(Alien3[localPlayer], true) exports.slothbot:setBotChase(Alien1[localPlayer], localPlayer) exports.slothbot:setBotChase(Alien2[localPlayer], localPlayer) exports.slothbot:setBotChase(Alien3[localPlayer], localPlayer) end addCommandHandler("Usar", usarDroga)
-
Preciso que o playSound3D toque nas mesmas coordenadas do marker, tentei dessa forma porém não deu certo phone = { {1970.5, -1776.5999755859, 12.60000038147}, {1365.0999755859, -1741.1999511719, 12.60000038147}, } randomPhone = math.random(1, #phone) function trafVenda () outputChatBox("Tabela randomizada, value: "..randomPhone ) setTimer(function() local markerphone= createMarker(phone[randomPhone][1], phone[randomPhone][2], phone[randomPhone][3], "cylinder",1.1, 16, 102, 231, 100 ) local X, Y, Z = getElementPosition (markerphone) local som = playSound3D ("Phone/telefone", X, Y, Z, false) local blip = createBlipAttachedTo(markerphone, 37, 2) outputChatBox("Marker e Blip criados.") if isElementWithinMarker (getLocalPlayer(), markerphone) then destroyElement(markerphone) destroyElement(blip) outputChatBox("Teste finalizado.") stopSound(som) end end, 15000, 1) end addCommandHandler("teste", trafVenda) BASS ERROR 2 in LoadMedia path:D:\MTA San Andreas 1.5\mods\deathmatch\resources\cristal\Phone\telefone 3d:1 loop:1 ACABEI D PERCEBER QUE N COLOQUEI .MP3 KKKK