-
Posts
186 -
Joined
-
Last visited
Everything posted by RenanPG
-
Tente usar esta função abaixo ao invés do getPlayerName(). https://wiki.multitheftauto.com/wiki/Ge ... artialName
-
function playerTest (p) return p:test() end
-
[ RESOLVIDO ] Como Bloquear Todos os mods em uma area verde
RenanPG replied to MrDante's topic in Programação em Lua
O que seria exatamente esses mods? -
Ajuda com um servidor linux
RenanPG replied to Ryuzaki's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Achei isso no google, ai tem algumas coisas que poderá ajudar vocês -
Coloque isso na linha 8. outputChatBox("O " .. getPlayerName(source) .. "#00ff00 Está Revistando o Jogador" .. getPlayerName(thePlayer))
-
Você também pode usar o setElementHealth(theElement, 0) como uma alternativa ao killPed no lado cliente, fica mais simples do que enviar ao servidor. source geralmente é o elemento que sofreu o evento dentro do addEventHandler(). getLocalPlayer() retorna o player do client.
-
Perfect example.
-
I'm not sure if I understood your question, but you can try one of these control checkers. if(getControlState("handbrake")) then end if(getControlState("brake_reverse")) then end
-
If width and height is set to 0, that would simply make it not visible. Are you sure that would be of any help? If the worcBreak and clip is false, it will be visible.
-
Where you put _, _ are float arguments, probably is that problem, try using 0. dxDrawText ( text, x - 1, y - 1, 0, 0, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) --not this, cause it returns a nil value. dxDrawText ( text, x - 1, y - 1, _, _, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
-
Seu código parece estar correto, só o else if está errado o correto é elseif (tudo junto). Forma incorreta: http://i.imgur.com/6yzjqxT.png Forma correta: http://i.imgur.com/fwzVCBl.png
-
O segundo argumento do exports.slothbot:setBotAttackEnabled() parece ser uma variável booleana (true/false). Não sei se essa função tem alguma coisa ligada ao uso da arma, mas testa isso aqui: exports.slothbot:setBotAttackEnabled(bot1, true)
-
[AJUDA] - Como colocar cor nesses botões?
RenanPG replied to BaseadoSWD's topic in Programação em Lua
@BaseadoSWD Posta a parte do script que não funciona. -
[AJUDA] - Como colocar cor nesses botões?
RenanPG replied to BaseadoSWD's topic in Programação em Lua
@BaseadoSWD lá no meu post acabei escrevendo errado na hora, o formato é Hex(Hexadecimal), mas da pra usar também essa função do DNL, que converte o ARGB em Hex. string.format("FF%.2X%.2X%.2X", 255,0,0) -- Isso retornará em Hex. local r, g, b = 255, 0, 0 guiSetProperty(button, "NormalTextColour", string.format("FF%.2X%.2X%.2X", r, g, b)) -
[AJUDA] - Como colocar cor nesses botões?
RenanPG replied to BaseadoSWD's topic in Programação em Lua
guiSetProperty(button, "NormalTextColour", "FF0000FF") guiSetProperty(button, "PushedTextColour", "FF0000FF") guiSetProperty(button, "HoverTextColour", "FF0000FF") Obs. As cores Hex nessa função não funcionam com o # no começo. E também de uma olhada nesse site que o DNL291 citou, ali tem todas as propriedades que você pode alterar nos componentes CEGUI. http://web.archive.org/web/20120706081430/http://cegui.org.uk/static/WindowsLookProperties.html -
You mean the resistance of the vehicle? setElementHealth(vehicle, 100) -- You can put values higher than 100 here. As 1000 for example.
-
got it. the did he want to do very nice What do you mean?
-
Use xXMADEXx's example, that you can add and remove cancelEvent.
-
I tested now, with three shoots the vehicle got exploded.
-
-- server addEventHandler("onResourceStart", resourceRoot, function() for index, player in ipairs(getElementsByType("player")) do if(isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup("Admin"))) then setElementData(player, "player:isAdmin", true) end end end) -- client addEventHandler("onClientRender", root, function() for index, player in ipairs(getElementsByType("player")) do local isAdmin = getElementData(player, "player:isAdmin") if(isAdmin) then end end end This should work, just check your debugscript.
-
this will not work, why the rhino takes no damage, except to flames Where did you read that?
-
You mean sending to client if certain player is or not an admin?
-
server-side addEventHandler("onVehicleDamage", getRootElement(), function() if(getElementModel(source) == 432) then setElementHealth(source, getElementHealth(source) - 100) end end)
-
https://wiki.multitheftauto.com/wiki/GivePedWeapon "This function gives the specified weapon to the specified ped. This function can't be used on players, use giveWeapon for that."
-
If it's not a heavy file, you can encrypt them using somehing like: https://wiki.multitheftauto.com/wiki/Base64Encode https://wiki.multitheftauto.com/wiki/Base64Decode addEventHandler('onClientResourceStart', resourceRoot, function() local img = fileOpen('img_encrypted.png') local pixels = base64Decode(fileRead(img, fileGetSize(img))) fileClose(img) local newImg = fileCreate("img.png") fileWrite(newImg, pixels) fileClose(newImg) image = dxCreateTexture("img.png") fileDelete("img.png") end)
