Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 21/07/20 in all areas

  1. Deu erro pois sua variável thePlayer é nula. Vc deveria ter colocado dentro de uma função com evento onPlayerJoin para ter acesso ao jogador.
    1 point
  2. Olá, bem-vindo ao fórum @lobin Temos a seção correta para divulgação de servidores, que se encontra em https://forum.multitheftauto.com/forum/175-servidores-para-jogar/ Para que seu conteúdo seja aceito, por favor leia as regras da seção aqui:
    1 point
  3. Please download and run MTADiag and follow the instructions. Press 'n' when asked. Post any Pastebin URL MTADiag gives you
    1 point
  4. You could try also something like this: https://community.multitheftauto.com/index.php?p=resources&s=details&id=13991 It is probably not what you are looking for, but it might be interesting to look at.
    1 point
  5. De acordo com o código, somente os Ajudantes estão sendo proibidos de usar. Eu trocaria sua segunda linha por essa: if not hasObjectPermissionTo (thePlayer, "command.mute", false) then outputChatBox ("Permissão negada!", thePlayer, 255, 0, 0) return end Se o jogador não tiver permissão para mutar outros jogadores, então manda a mensagem pra ele e nada acontece. Dessa forma, todo o Staff (jogadores com permissão de mutar) terão acesso.
    1 point
  6. função : getDistanceBetweenPoints3D () --/ https://wiki.multitheftauto.com/wiki/GetDistanceBetweenPoints3D exemplo : local x1,y1,z1 = getElementPosition(source) local x2,y2,z2 = getElementPosition(elemento) if ( getDistanceBetweenPoints3D ( x1,y1,z1,x2,y2,z2 ) <= 10 ) then print("dentro") else print("fora") end
    1 point
  7. Use the partial animation crry_prtial for walking while holding the crate. Set last parameter to true (freezeLastFrame). setPedAnimation(localPlayer, "carry", "crry_prtial", 0, false, true, true, true)
    1 point
  8. Salut , Aujourd'hui je vous présente le script de "boutique-system" . Le script est fonctionnel sur le GM OwlGaming . ID d'objet utilisé : 1887 . Screenshot : Youtube Video : https://www.youtube.com/watch?v=cjRIJKUxAQA Mon discord : Acenox#0308
    1 point
  9. @Wumbaloo , merci l'ami . Oui je peux faire l'multi page .
    1 point
  10. Pas mal ton petit script ! Mais si il y a une vingtaine d'items, tu gères le multi-page ? (ou bien une sorte de scroll ?)
    1 point
  11. addCommandHandler ( "sumido", function ( thePlayer ) local conta = getAccountName (getPlayerAccount(thePlayer)) if not isObjectInACLGroup ( "user." .. conta, aclGetGroup ( "admin" ) ) then outputChatBox("Permissão negada!",thePlayer,255) return end for k, v in ipairs( getAttachedElements( thePlayer ) ) do destroyElement( v ); outputChatBox("Modo sumido ativado!",thePlayer,255) end end )
    1 point
  12. 1 point
  13. Teste lá : function triggerVehicleSystem(sys) local veh = getPedOccupiedVehicle(source) if veh and getVehicleController(veh) == source then if sys == "engine" then if not getElementData(veh,"Gasolina") then setVehicleEngineState(veh, not getVehicleEngineState(veh)) return end if getElementData(veh,"Gasolina") > 0 then setVehicleEngineState(veh, not getVehicleEngineState(veh)) else outputChatBox("Нет бензина!",source,200,0,0) end elseif sys == "lights" then if getVehicleOverrideLights( veh ) ~= 2 then setVehicleOverrideLights( veh, 2 ) else setVehicleOverrideLights( veh, 1 ) end elseif sys == "lock" then setVehicleLocked(veh,not isVehicleLocked(veh)) end end end addEvent("triggerVehicleSystem",true) addEventHandler("triggerVehicleSystem",root,triggerVehicleSystem) --# Adicionado : local estado_do_motor = { } addEventHandler ( "onPlayerVehicleExit", getRootElement ( ), function ( veh, seat, jacked ) if seat == 0 then if estado_do_motor[veh] == "true" then setVehicleEngineState ( veh, true ) else setVehicleEngineState ( veh, false ) end end end) --# Verifica o Motor, ao Começa a Sair do Veiculo. addEventHandler ( "onVehicleStartExit", getRootElement ( ), function ( thePlayer, seat, jacked ) if seat == 0 then local veh = getPedOccupiedVehicle(thePlayer) estado_do_motor[veh] = tostring(getVehicleEngineState(veh)) end end) addEventHandler ( "onPlayerVehicleEnter", getRootElement ( ), function ( veh, seat, jacked ) if seat == 0 then if estado_do_motor[veh] == "true" then setVehicleEngineState ( veh, true ) else setVehicleEngineState ( veh, false ) end end end) --# Verifica o Motor, ao Começar a Entrar no Veiculo. addEventHandler ( "onVehicleStartEnter", getRootElement ( ), function ( thePlayer, seat, jacked ) if seat == 0 then local veh = getPedOccupiedVehicle(thePlayer) estado_do_motor[veh] = tostring(getVehicleEngineState(veh)) end end)
    1 point
  14. It is just an extra block, which runs 1 time. Similar to: if true then end And no it is not required, but it makes it very clear that some action are happening there. You more often see those be used to enclose reused variables, without overwrite the original. local base = 1 if 1 == base then do local base = 2 print(base) -- 2 end do local base = 3 print(base) -- 3 end print(base) -- 1 end Or delete unused variables: local a do local b = 100 a = b * b * b end
    1 point
  15. سلام عليكم ورحمة الله وباركته بـتوفيق لك ولعملك بس نصاحة إذا دخلت لا تطلع منه ذا شغلك وانشاء الله بجيبلك ناس تشتري خوادم او سيرفورات
    1 point
×
×
  • Create New...