Jump to content

RenanPG

Members
  • Posts

    186
  • Joined

  • Last visited

Everything posted by RenanPG

  1. Tente usar esta função abaixo ao invés do getPlayerName(). https://wiki.multitheftauto.com/wiki/Ge ... artialName
  2. function playerTest (p) return p:test() end
  3. O que seria exatamente esses mods?
  4. Achei isso no google, ai tem algumas coisas que poderá ajudar vocês
  5. Coloque isso na linha 8. outputChatBox("O " .. getPlayerName(source) .. "#00ff00 Está Revistando o Jogador" .. getPlayerName(thePlayer))
  6. 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.
  7. Perfect example.
  8. 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
  9. RenanPG

    help dxText

    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.
  10. RenanPG

    help dxText

    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 )
  11. 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
  12. 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)
  13. @BaseadoSWD Posta a parte do script que não funciona.
  14. @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))
  15. 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
  16. You mean the resistance of the vehicle? setElementHealth(vehicle, 100) -- You can put values higher than 100 here. As 1000 for example.
  17. got it. the did he want to do very nice What do you mean?
  18. Use xXMADEXx's example, that you can add and remove cancelEvent.
  19. I tested now, with three shoots the vehicle got exploded.
  20. -- 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.
  21. this will not work, why the rhino takes no damage, except to flames Where did you read that?
  22. You mean sending to client if certain player is or not an admin?
  23. server-side addEventHandler("onVehicleDamage", getRootElement(), function() if(getElementModel(source) == 432) then setElementHealth(source, getElementHealth(source) - 100) end end)
  24. RenanPG

    ammo

    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."
  25. 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)
×
×
  • Create New...