Jump to content

LucasBaker

Members
  • Posts

    134
  • Joined

  • Last visited

Everything posted by LucasBaker

  1. Yes when a player enter appear bitch i love you
  2. function antOfensa () x = string.gsub("bitch", "%w+", "%0 %0", 1) --> x="I Love You" end ?
  3. Well I'm trying to create a script with the following function one player enters such a bitch and instead of leaving that word out another eg Censored just that I do not know what it could someone teach me what I use?
  4. Well I would like to use the SetTimer for when a player enter / or life / vest he takes life but can only use these two commands again after 20 seconds I have tried everything but just goes to the SetTimer function and not for command could anyone do to me? -- Função da vida: function buyhealth ( thePlayer ) local money = getPlayerMoney ( thePlayer ) if money >= 500 then outputChatBox("Você comprou Vida por 500$",thePlayer, 255, 106, 106) local thePlayerhealth = getElementHealth ( thePlayer ) setElementHealth ( thePlayer, 569 ) takePlayerMoney ( thePlayer, 500 ) else outputChatBox("Não há dinheiro suficiente, necessário 500$",thePlayer, 139, 101, -- s8) --> end end addCommandHandler ( "vida", buyhealth ) --Função do colete: function buyarmor ( thePlayer ) local money = getPlayerMoney ( thePlayer ) if money >= 500 then outputChatBox("Você comprou Colete por 500$",thePlayer, 255, 106, 106) local thePlayerarmor = getPedArmor(thePlayer) setPedArmor ( thePlayer, 100 ) takePlayerMoney ( thePlayer, 500 ) else outputChatBox("Não há dinheiro suficiente, necessário 500$!",thePlayer, 139, 117, 0) end end addCommandHandler ( "colete", buyarmor )
  5. not worked CODE: function mensagemAdmin (player) local accountName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup("user."..accountName , aclGetGroup("SuperModerator")) then outputChatBox ( "#FFFF00O Administrador "..getPlayerName(player).." Entrou em Modo Trabalho", getRootElement(), 255, 0, 0, true ) setElementHealth (player, 100 ) setPlayerArmor (player, 100 ) setPlayerSkin(player, 217) end addCommandHandler ( "godon", mensagemAdmin ) function mensagemAdmin2 (player) local accountName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup("user."..accountName , aclGetGroup("SuperModerator")) then outputChatBox ( "#FFFF00O Administrador "..getPlayerName(player).." Entrou em Modo Jogador", getRootElement(), 255, 0, 0, true ) setPlayerSkin(player, 0) end addCommandHandler ( "godoff", mensagemAdmin2 )
  6. freeroam is started? freeroam disable and try or . Look for the file "fr_server.lua" and open. 3. Press CTRL + F and search for "msg: gsub" 4. Once you have found the "msg: gsub" 5. Delete this part: Location r, g, b = getPlayerNametagColor (source) outputChatBox (GetPlayerName (source) .. '# FFFFFF' .. msg: gsub ('#% x% x% x% x% x% x',''), g_Root, r, g, b, true) outputServerLog ("CHAT:" .. GetPlayerName (source) .. ":" .. msg) 6. Save the file. 7. Paste this file in the zipped freeroam.
  7. LucasBaker

    doubt

    What do I use to make a start on a resource from 2 mins (for example)? and when these two minutes pass the resource would be paused
  8. \/ function teleportarPlayer (player, CMD, targetName, thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then if not targetName then outputChatBox("Uso Correto: /tep nick", player) else local target = getPlayerFromName (targetName ) if not target then -- check if the name is valit outputChatBox("ERRO: Jogador não encontra-se online!", player) else local x,y,z = getElementPosition ( target ) setElementPosition ( player,x,y,z+1) --setElementPosition ( player, getElementPosition ( target )) end end end addCommandHandler ( "tep", teleportarPlayer )
  9. 12 and puts in mtaserver
  10. Well I'm trying to create a script to do when I type / forum appear eg a text from another site I tried to do the following META: resource="ajax" /> CODE.LUA function showChatMessage ( message ) outputChatBox ( message ) return 5; end addCommandHandler ( "forum", showChatMessage ) PAGE.HTM TESTE good as you can see there is still something I used the following term wiki Ressource_Acces_Internet
  11. I used / debug script in script and appeared errors only this much that I still do not understand the errors could someone help me? image http://img191.imageshack.us/img191/4044/dasddt.png CODE: local messagesList = { "Visite: SBGames.com.br", "X sobre um carro para grudar.", "Carregando...", "Desejamos a todos um Bom Jogo.", } local currentMessage = 0 -- ******************** -- * Event handlers * -- ******************** addEventHandler("onClientPreRender", getRootElement(), function() local screenWidth, screenHeight = guiGetScreenSize() -- Draw the news sticker. dxDrawRectangle(screenWidth - 204, 4, 200, 20, tocolor(0, 0, 0, 192), false) -- Draw all strings. dxDrawText(messagesList[currentMessage + 1], screenWidth - 202, 6, screenWidth - 6, 16, tocolor(255, 0, 0, 255), 1, "default-bold", "center", "top", false, false, false) end ) function updateMessage() if (currentMessage == 4) then currentMessage = 0 else currentMessage = currentMessage + 1 end end setTimer(updateMessage, 5000, 0)
  12. -- # Client Side : local x,y = guiGetScreenSize( ) local left,top,right,bottom = x*560/1360,y*550/768,x*0/1360,y*30/768 addEventHandler("onClientRender",root, function() local RealTime = getRealTime ( ) local hours = RealTime.hour local minutes = RealTime.minute local seconds = RealTime.second local dia = RealTime.monthday local mes = RealTime.month +1 local ano = Realtime.year +1900 dxDrawText(hours..":"..minutes..":"..seconds,left+220,top+100,right,bottom,tocolor(255,255,255,255),1,"sans") dxDrawText(dia.."/"..mes.."/"..ano,left+220,top+110,right,bottom,tocolor(255,255,255,255),1,"sans") end ) not worked the script @edit understood RealTime was tiny, thanks
  13. Could someone to help? I've put the date and the month of the wiki is incorrect then I put +1 finally the script did not work -- # Client Side : local x,y = guiGetScreenSize( ) local left,top,right,bottom = x*560/1360,y*550/768,x*0/1360,y*30/768 addEventHandler("onClientRender",root, function() local RealTime = getRealTime ( ) local hours = RealTime.hour local minutes = RealTime.minute local seconds = RealTime.second local dia = RealTime.monthday local mes = RealTime.month +1 local ano = Realtime.year 1900 dxDrawText(hours..":"..minutes..":"..seconds,left+220,top+100,right,bottom,tocolor(255,255,255,255),1,"sans") dxDrawText(dia.."/"..mes.."/"..ano,left+220,top+110,right,bottom,tocolor(255,255,255,255),1,"sans") end )
  14. LucasBaker

    doubt

    is there any program to make scripts aligned well?
  15. sorry had not seen it I will test now @edit came to nothing code: function teleportarPlayer (player, CMD, targetName) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then if not targetName then outputChatBox("Uso Correto: /goto nick") else local target = getPlayerFromName (targetName ) if not target then -- check if the name is valit outputChatBox("ERRO: Jogador não encontra-se online!") else local x,y,z = getElementPosition ( target ) setElementPosition ( player,x,y,z+1) --setElementPosition ( player, getElementPosition ( target )) end end end addCommandHandler ( "goto", teleportarPlayer )
  16. It could also help me with something? I am not able to release the function only for administrator function teleportarPlayer (player, CMD, targetName, thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then if not targetName then outputChatBox("Uso Correto: /goto nick") else local target = getPlayerFromName (targetName ) if not target then -- check if the name is valit outputChatBox("ERRO: Jogador não encontra-se online!") else local x,y,z = getElementPosition ( target ) setElementPosition ( player,x,y,z+1) --setElementPosition ( player, getElementPosition ( target )) end end end addCommandHandler ( "goto", teleportarPlayer )
  17. also could not get it right explain? outputchatbox \/ you had not defined the function in parameter now try function ( source ) outputChatBox ("lol", 255, 255, 255, source, true)
  18. http://www.mods-mta.blogspot.com.br/2013/05/glue-2.html this site has What do you need
  19. Well I would like to know why this script is not teleporting to the player the goal is simple typing / goto name player and teleport to the player function teleportarPlayer ( source, posX, posY, posZ ) getPlayerFromName ( source ) getElementPosition ( source ) setElementPosition ( source, posX, posY, posZ ) end addCommandHandler ( "goto", teleportarPlayer )
×
×
  • Create New...