Jump to content

RenanPG

Members
  • Posts

    186
  • Joined

2 Followers

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. local function ujteamsay(message, messageType) if messageType == 2 then cancelEvent() local team = getPlayerTeam(source) if(team) then for i,player in pairs(getPlayersInTeam(team)) do outputChatBox("(CSOPORT) "..getPlayerName(source)..": #FFffFF"..message, player, red, green, blue, true ) end end end end addEventHandler("onPlayerChat", root, ujteamsay)
  2. setTimer(function(), local time = getRealTime() if(time.hour == "21" and time.minute == "0") then elseif(time.hour == "5" and time.minute == "0") then end end, 60000, 0)
  3. I'm not sure if mta browser enable cookies, try this to store on JS... http://www.w3schools.com/js/js_cookies.asp
  4. I think it is easier for your purpose: (You'll need to create an object alpha 0 and attach to your car) https://wiki.multitheftauto.com/wiki/MoveObject
  5. 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 )
  6. RenanPG

    cancel bind

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

    cancel bind

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

    cancel bind

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

    cancel bind

    addEventHandler("onClientKey", root, function(key, press) if(key == "w") then cancelEvent() end end) https://wiki.multitheftauto.com/wiki/OnClientKey
  10. 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
  11. 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
  12. Yes, it has difference. When you are not logged in, automatically you get an guest account(when you quit the game, this account is deleted, consequently all data of this account will be lost). So, if you check using getPlayerAccount() it will return the account being guest or not, to be sure that the player logged in use isGuestAccount() after you got the account from the player using getPlayerAccount(). https://wiki.multitheftauto.com/wiki/IsGuestAccount https://wiki.multitheftauto.com/wiki/GetPlayerAccount
  13. 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 )
  14. 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.
×
×
  • Create New...