Jump to content

DNL291

Moderators
  • Posts

    3,875
  • Joined

  • Days Won

    67

Everything posted by DNL291

  1. The script is client-side in meta.xml?
  2. Both scripts have the client-side functions.
  3. function resurgeveiculo () if isElementInWater(vehicletrafic[source]) then setTimer( setElementPosition, 1000, 1, vehicletrafic[source], 1650.54077, -1626.85131, 24.89843 ) end end setTimer( resurgeveiculo, 400, 0 )
  4. Use a função unbindKey como já citado acima, ou exporte uma função para verificar se o jogador está preso retornando um valor booleano, Isso caso o script não esteja dentro do recurso Freeroam.
  5. Because he placed 'nemesis' instead 'nemesi' in the getElementHealth function.
  6. Kill the timer at the event "onBotWasted".
  7. Resource from another author: https://community.multitheftauto.com/ind ... ls&id=6224 DONE
  8. getPlayerTeam getTeamName spawnPlayer
  9. Já reportei ao Stanley via PM.
  10. Não precisa, pois o recurso usa sistema SQL para armazenar.
  11. Não. Você pode adicionar usando o recurso House_system, digitando o comando para abrir a janela, e cria-las a partir da janela.
  12. Quer dizer blip? createBlip
  13. --[[ Author: xXMADEXx, with Castillo's Help File: client.lua type: client Copyright 2012 (c) xXMADEXx --]] function cancelPedDamage ( attacker ) cancelEvent() end addEventHandler ( "onClientPedDamage", getRootElement(), cancelPedDamage ) police_window = guiCreateWindow(350,205,728,380,"RoG Police Window",false) guiSetVisible(police_window, false) guiSetAlpha(police_window,1) guiWindowSetSizable(police_window,false) playerList = guiCreateGridList(14,34,699,272,false,police_window) column = guiGridListAddColumn(playerList,"Name",0.2) police_closeBTN = guiCreateButton(163,325,416,36,"Close",false,police_window) bindKey("F4", "down", function ( ) name = getTeamName(getPlayerTeam(player)) if ( name == "Police" ) or ( name == "Military" ) or ( name == "FBI" ) or ( name == "Swat" ) then guiSetVisible(police_window, false) end guiSetVisible(police_window, not guiGetVisible ( police_window )) showCursor(guiGetVisible ( police_window )) if ( guiGetVisible ( police_window ) ) then guiGridListClear ( playerList ) if ( column ) then for id, player in ipairs ( getElementsByType ( "player" ) ) do local row = guiGridListAddRow ( playerList ) local r, g, b = getPlayerNametagColor ( player ) guiGridListSetItemText ( playerList, row, column, getPlayerName ( player ), false, false ) guiGridListSetItemColor ( playerList, row, column, r, g, b ) end end end end end ) -- Close Button function close() guiSetVisible(police_window, false) guiSetVisible(playerList, false) guiSetVisible(column, false) showCursor(false,false) end addEventHandler("onClientGUIClick", police_closeBTN, close)
  14. https://community.multitheftauto.com/ind ... ls&id=5490 DONE
  15. Se você não quiser o gamemode Play em seu servidor, você deve remove-lo no arquivo mtaserver.conf para que não inicie quando ligar o servidor. Vou aproveitar essa explicação do Stanley apenas para completar, sobre o @protected, isso serve para você proteger o recurso para que nunca seja desligado no servidor.
  16. Isso deve ser o gamemode Play, verifique se o mesmo está iniciado. Ou se tiver com algum problema com ele, reinstale-o em sua pasta de recursos. -- Referente ao seu outro pedido de ajuda não podemos ajudar com algo que não seja relacionado ao MTA. Mas você pode pedir ajuda no subforum Offtopic.
  17. Pelo que eu entendi ele já criou a Equipe através do Painel admin, porém quando se comunica pelo teamchat não funciona. @marcelofilipe O teamchat é um chat somente para membros de uma equipe, ele sempre irá funcionar deste modo. Verifique se pode ser algum engano seu.
  18. https://community.multitheftauto.com/ind ... ls&id=6173 https://community.multitheftauto.com/ind ... ls&id=6178 DONE
  19. DNL291

    Help

    Server side: local box1 = createObject( 2289, 2694, -1425, 15.2 ) local col1 = createColCuboid( 2693, -1426, 15.2, 2, 2, 3 ) addEventHandler('onColShapeHit', col1, function (hitElement) setTimer( function( ) triggerClientEvent('anims', hitElement, hitElement) end, 50, 1 ) setTimer( function( ) triggerClientEvent('anims2', hitElement, hitElement) destroyElement( box1 ) destroyElement( col1 ) end, 1500, 1 ) end ) Client side: addEvent('anims', true) addEventHandler('anims', getRootElement(), function(player) if isElement(player) then setPedAnimation( player, 'CARRY', 'liftup' ) triggerServerEvent('weapons"n"money', player) end end ) addEvent('anims2', true) addEventHandler('anims2', getRootElement(), function(player) if isElement(player) then setPedAnimation( player, false ) end end )
  20. Nesse caso, você deve editar o recurso Freeroam e os outros recursos que, caso o jogador esteja preso não seja permitido fazer tal ação. Para isso você deve usar uma função exportada, criada no script de prisão. Embora você possa resolver de outra maneira, isso é oque eu recomendo.
  21. Você quer bloquear (desativar) para qual função? Use a função unbindKey: unbindKey( player thePlayer, string key, [ string keyState, function handler ] ) -- Da próxima vez que abrir um topico relacionado a linguagem Lua (Scripting) abra no subforum Programação em Lua.
  22. The onMarkerHit event is server-side only.
  23. Why setElementHealth (thePlayer, 0) ? If you want kill the player use the killPed() function.
  24. theMarker = createMarker ( 262, 1978, 18, "cylinder", 100, 255, 255, 0, 170 ) addEventHandler ( "onMarkerHit", theMarker, function ( thePlayer ) if getElementType ( thePlayer ) == "player" and getPlayerSerial( thePlayer )== "YouSerialHere" then outputChatBox ( "* Welcome Sir,", thePlayer, 20, 255, 0, true ) else return end end )
×
×
  • Create New...