Jump to content

RenanPG

Members
  • Posts

    186
  • Joined

About RenanPG

  • Birthday 10/03/1993

Details

  • Location
    São Paulo - SP

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

RenanPG's Achievements

Mark

Mark (16/54)

3

Reputation

  1. I'm not sure if mta browser enable cookies, try this to store on JS... http://www.w3schools.com/js/js_cookies.asp
  2. Somente em server o player é passado como parâmetro(no caso thePlayer). function showVehicleName () local theVehicle = getPedOccupiedVehicle (localPlayer) if theVehicle then outputChatBox ( "Name of the Vehicle: " .. getVehicleName ( theVehicle ), thePlayer ) else outputChatBox ( "You do not have a Vehicle!", thePlayer, 255, 0, 0, true ) end end addCommandHandler ( "getcarname", showVehicleName )
  3. RenanPG

    cancel bind

    addEventHandler("onClientKey", getRootElement(), function(button, press) if(button == "space") then local keyState = getKeyState("w") if(keyState) then cancelEvent() end end end)
  4. RenanPG

    cancel bind

    It is not possible to cancel bindKey function, only via event.
  5. RenanPG

    cancel bind

    Something like this? toggleControl("sprint", false)
  6. RenanPG

    cancel bind

    addEventHandler("onClientKey", root, function(key, press) if(key == "w") then cancelEvent() end end) https://wiki.multitheftauto.com/wiki/OnClientKey
  7. Take a look on Performancebrowser to check server usage first... it seems like high usage of bandwidth, memory or even overloaded cpu. https://wiki.multitheftauto.com/wiki/Re ... ncebrowser
  8. I'm not sure how to do it correctly, but you need a recursion to loop through the sub tables. Something like this below: function table.getIndexByValue(t,value) for i,v in pairs(t) do -- or ipairs, if count zero if(v == value) then return i elseif(type(v) == "table") then return table.getIndexByValue(v,value) -- recursion, call the same function for internal tables end end end
  9. setCursorAlpha(0) function show() local showing = isCursorShowing () if showing then local screenx, screeny = getCursorPosition() dxDrawImage(screenx, screeny, 50, 50, 'files/crosshair.png') end end addEventHandler('onClientRender', root, show )
  10. function meteoro(targetPlayer) local x, y, z = getElementPosition(getLocalPlayer()) createProjectile(getLocalPlayer(),20, x ,y, z+10, 2, getLocalPlayer()) end addCommandHandler("meteoro", meteoro) Parece que o erro do seu código era apenas o id, pois somente o projétil 20 se direciona ao Target.
  11. https://wiki.multitheftauto.com/wiki/OnClientCursorMove https://wiki.multitheftauto.com/wiki/OnClientMouseMove
  12. Esse erro ocorreu pq não tem como concatenar um elemento (no caso o player) com uma string, o certo seria usar o nome da conta. segue o exemplo abaixo: local account = getPlayerAccount(player) if(account) then -- caso exista local accountName = getAccountName(account) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Console" ) ) then -- caso a conta seja Console end end
  13. markers = { {x = -1990.24292, y = 262.62424, z = 34.00000}, } for i,marker in pairs(markers) do createMarker(marker.x, marker.y, marker.z, "cylinder", 4, 0, 141, 255, 255, getRootElement( ) ) end Não entendi muito bem oque você está tentando fazer, mas se é pra criar Markers com uma table poderia ser assim.
×
×
  • Create New...