
Michael#
Members-
Posts
168 -
Joined
-
Last visited
Everything posted by Michael#
-
Como criar um server
Michael# replied to honda_aa's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Se você manter uma máquina 24 horas ligada... Se você não poder fazer isso, você pode sempre pagar para uma empresa de qualidade e de confiança para deixar seu servidor online sempre. -
Como criar um server
Michael# replied to honda_aa's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
A porta 22126 não necessita de estar aberta, mas... Tem vezes que demora para o servidor aparecer no Game-Monitor, isso já foi reportado aqui. Tenha paciência e espere. Se continuar, avise. -
I think you can simplify all to: exports [ 'scoreboard' ]:addScoreboardColumn ( 'Group' ) setTimer ( function ( ) for _, player in ipairs ( getElementsByType 'player' ) do local data = getElementData ( player, 'role' ) setElementData ( player, 'Group', tostring ( data ) == tostring ( police ) and 'Police' or nil ) end end, 5000, 0 ) If don't work, show us what is "police" variable.
-
call ( getResourceFromName ( 'login' ), 'guiSetVisible(LoginWin, true)' ); call function is to call exported functions from resources, not to execute functions in another resource. It does the same of: exports [ 'login' ]:initExample() -- or exports.login:initExample()
-
I use this image because I love GTA 3 ( don't have the best graphics but I love the story and the city ) and it's one of the games that doesn't lags here haha.
-
Problema MTA:SA 1.3
Michael# replied to Pedro Johnson's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Você clica em "Save" e sai do MTA, não dá nem tempo de salvar o mapa... É óbvio que isso vai acontecer... -
local tVehicles = { { txd = 'data/infernus.txd', txdID = 411, dff = 'data/infernus.dff', dffID = 411 }; { txd = 'data/elegy.txd', txdID = 562, dff = 'data/elegy.dff', dffID = 562 }; } addEventHandler ( 'onClientResourceStart', resourceRoot, function ( ) for _, vehicle in pairs ( tVehicles ) do engineReplaceModel ( engineLoadDFF ( vehicle.dff, vehicle.dffID ), vehicle.dffID ); engineImportTXD ( engineLoadTXD ( vehicle.txd, vehicle.txdID ), vehicle.txdID ); end end ) To add more vehicles to the table do: { txd = 'pathToTheTXD', txdID = idOfTheTxdFile, dff = 'pathToTheDFF', dffID = idOfTheDffFile };
-
First you cant call a resource from a event What do you mean? He can, but not that way he is doing. Must be something like this: addEventHandler ( 'onClientGUIClick', root, function ( ) if ( source == testBtn ) then call ( getResourceFromName ( 'Example' ), 'initExample' ); end end )
-
I think this is better: addCommandHandler ( 'cpofficer', function ( uPlayer, sCommand, nID, nX, nY, nZ ) if ( not nID or not nX or not nY or not nZ ) then return end createPed ( tonumber ( nID ), tonumber ( nX ), tonumber ( nY ), tonumber ( nZ ) ); end ) Also, tabulate your code
-
You must tabulate the code...
-
local cmarker = createMarker ( 2069.53760, -1628.82056, 12.87616, "cylinder", 2, 255, 255, 0, 50 ) addEventHandler ( 'onClientMarkerHit', root, function ( uPlayer ) if ( source == cmarker ) then guiSetVisible ( window, true ) end end )
-
Search in the community.
-
Are you crazy Slash? That's a really mess dude!
-
First, "urfont" is a variable, not a string. Second, I think it's impossible to use modified fonts on custom dx text librarys.
-
Debug, check MySQL settings, check if MySQL module is working properly.
-
onUpdateMoneyPlayerList = function ( ) if ( column ) then for _, player in ipairs ( getElementsByType 'player' ) do local row = guiGridListAddRow ( pList ) local name = getPlayerName ( player ) guiGridListSetItemText ( pList, row, column, string.gsub( name, "#%x%x%x%x%x%x", "" ), false, false ) end end end Is that hard?
-
You can't solve the problem if you don't know what is "sirene" variable.
-
Attach data to elements? I think no. And your problem about destroyElement is that you got it from other script and will never work.
-
I said him the same, he don't want to learn Lua. @@fivosga, as Solidsnake14 said, you must LEARN to do it, we will not do it for you.
-
Trigger event "qtm" to server-side with GUI element text after the element and in event function "qtm" add ... example, myText. myText will be the GUI element text that you triggered. Understand?
-
Check what xmlCreateFile returns.