Jump to content

'~DaLesTe^'

Members
  • Posts

    91
  • Joined

  • Last visited

Everything posted by '~DaLesTe^'

  1. How can I do this? I do not know: \
  2. How can I setting a tag to a player through his gang / group? Example /gangtag TST and the player gets the tag to insert Portuguese: Como posso fazer um comando que ao digitar /gangtag e logo em seguida a tag por exemplo: /gangtag TST o jogador receba a tag inserida em seu Nome : [TST]PlayerName..
  3. How can I put a message when there is already an established account? For example "There is already an account with this name" If Possible in dx
  4. Since it is not possible to create a separate group named, for example, / gangcriar TE ST, which form the group only as the first word after space In conclusion it is not possible to create a gang with separate letters
  5. Only I see the changing color, those outside the car does not see
  6. How can I do this with a vehicle that I'm in? Without change others but only my.
  7. function createTeamsOnStart () teamstaff = createTeam ( "Equipe M4", color ) local color = {} color[1] = math.random(0,126) color[2] = math.random(0,200) color[3] = math.random(0,126) color[4] = math.random(0,255) setTeamColor ( teamstaff, color ) end addEventHandler("onResourceStart", resourceRoot, createTeamsOnStart) function lol ( player, command ) setPlayerTeam ( player, teamstaff ) end addCommandHandler ( "gm", TeamsOnStart ) How do I get the gang I created typing / gm be changing color every 2 seconds
  8. How can I make the dwDraw to move from its starting point to the other side of the screen ? local x,y = guiGetScreenSize() local admin = "" local mensagem = "" local iv = false local ATIVADO = false a1 = 200 a2 = 255 local lastColorChange = getTickCount ( ); local color = 1; addEvent("show", true) function mostrar(player, msg) lastColorChange = getTickCount ( ); lastColor = 1; mensagem = msg admin = player ATIVADO = true a1 = 200 a2 = 255 if (isTimer(timer1)) then killTimer(timer1) end timer1 = setTimer(function() setTimer(function() if a1 > 0 then a1 = a1 - 5 end if a2 > 0 then a2 = a2 - 5 end if a1 <= 0 and a2 <= 0 then ATIVADO = false admin = "" mensagem = "" end end, 50, 53) end, 6000, 1) end addEventHandler("show", getRootElement(), mostrar) function drawStuff() if (ATIVADO == true) then if ( getTickCount() - lastColorChange >= 2000 ) then lastColorChange = getTickCount ( ); if ( lastColor == 1 ) then lastColor = 2; else lastColor = 1; end end if ( lastColor == 1 ) then dxDrawRectangle ( x/40, y/2.8, x/3, y/5, tocolor ( 87, 27, 239, a1 ) ) dxDrawRectangle ( x/40, y/2.8, x/3, y/30, tocolor ( 0, 43, 65, a2) ) else dxDrawRectangle ( x/40, y/2.8, x/3, y/5, tocolor ( 0, 0, 0, a1 ) ) dxDrawRectangle ( x/40, y/2.8, x/3, y/30, tocolor ( 0, 43, 80, a2) ) end dxDrawText (string.gsub ( admin, "#%x%x%x%x%x%x", "" ), x/35, y/1.42, x/4.6, y/25, tocolor ( 0, 0, 0, 255 ), 1, "sans", "center", "center", false, false, false, false) dxDrawText (string.gsub ( admin, "#%x%x%x%x%x%x%x%x", "" ), x/35, y/1.42, x/4.6, y/25, tocolor ( 255, 255, 255, 255 ), 1, "sans", "center", "center", false, false, false, true) dxDrawText ( mensagem, x/31, y/2.52, x/4.6, y/2.4, tocolor ( 100, 255, 129, 255 ), 0.0, "clear", "left", "top", true, true, false, false) dxDrawText ( mensagem, x/31, y/2.53, x/4.0, y/1.1, tocolor ( 100, 255, 129, 255 ), 1.2, "clear", "left", "top", true, true, false, false) end end addEventHandler("onClientRender", root, drawStuff) --By: Daleste
  9. I want to make these teleports commands are possible only run them in dimension 0 in the game
  10. How do I run this command as few teleports in size 0? Script: teleportes = { {"drift",-296.92343139648, 1539.3560791016, 75.5625,"Foi para a Pista de Drift"}, {"floresta",-1292.8233642578, -2159.5888671875, 22.212591171265,"Foi para a Floresta"}, {"bairro",770.75983886719, -673.3233032226, 366.39999389648,"Foi para o Bairro"}, {"mount",-2338.4633789063, -1623.2933349609, 483.70858764648,"Foi para o Mount Chilliad"}, {"praia",324, -1779, 5,"Foi para a Praia"}, {"pistals",1994, -2446, 14,"Foi para o Aeroporto de LS"}, {"pistalv",1498, 1528, 11,"Foi para o Aeroporto de LV"}, {"pistasf",-1339, 52, 15,"Foi para o Aeroporto de SF"}, {"favela",2249, -1047, 55,"Foi para a Favela"}, {"rampa1", -1594.1474609375, -254.13656616211, 476.79843139648,"Foi para a Rampa #1"}, {"paraquedas", 989.94641113281, -1621.0570068359, 2251.9091796875,"Foi saltar de Paraquedas"}, {"rampa2",1078.3706054688, 972.89129638672, 266.59530639648, "Foi para a Rampa #2"}, {"arena1",2026.0793457031, -1422.6387939453, 16.9921875,"Foi para a Arena #1"}, {"arena2",-2280.0202636719, 2308.8525390625, 4.9635863304138,"Foi para a Arena #2"}, {"x2",1330.7166748047, 2136.0305175781, 11.015625,"Foi para a Arena X2"}, {"x1", -5307.2294921875, -205.81309509277, 4956.482421875, "Foi para a Arena X1"}, {"arrancada",406.13702392578, 2537.8151855469, 16.546295166016,"Foi para a Arrancada"}, {"rampa3",1461.7163818359, 341.52435302734, 665.28228759766,"Foi para a Rampa #3"}, {"cj",2488, -1670, 14,"Foi para a Casa do CJ"}, {"hospital",1178.1077880859, -1323.4639892578, 14.103762626648,"Foi para o Hospital"}, {"mount",-2338.4633789063, -1623.2933349609, 483.70858764648,"Foi para o Mount Chilliad"}, {"topo",860.58880615234, -2287.9299316406, 892.32263183594,"Foi para o Topo"}, {"arena4", 2287.1967773438, 672.9337685547, 10.671875,"Foi para a Arena #4"}, {"ammu", 2119.7568359375, 957.57293701172, 10.81298828125,"Foi para a Ammu"}, {"avenida", 2058.6020507813, 837.92016601563, 6.8843750953674,"Foi para a Avenida"}, {"banco", 2156.4516601563 , 1991.3203125, 10.671875,"Foi para o Banco"}, {"arena", 580.9580078125, -3076.4384765625, 10.0703125,"Foi para a Arena"}, {"racha", 1006.9000244141, 2473.8000488281, 10.800000190735,"Foi para o Racha"}, } local commandSpam = {} function pCommandSpam(comando) for k,v in pairs(teleportes) do if getElementDimension(source, 0) then if comando == v[1] then if (not commandSpam[source]) then local veh = getPedOccupiedVehicle(source) setElementPosition ( source, v[2], v[3], v[4] ) if (veh) then setElementPosition ( veh, v[2], v[3], v[4] ) end if(v[5])then outputChatBox( "#fff000[ #ffffff/"..v[1].." #fff000] #ffffff".. getPlayerName(source) .."(ID:" .. (getPlayerID(source) or "???") .. ") "..v[5].." ", root, 0, 255, 0, true ) end commandSpam[source] = 1 elseif (commandSpam[source] == 1) then cancelEvent() outputChatBox ( "Por favor aguarde 20 segundos para se teleportar novamente!", source) else commandSpam[source] = commandSpam[source] + 1 end break end end end end addEventHandler("onPlayerCommand", root, pCommandSpam) setTimer(function() commandSpam = {} end, 20000, 0) function getPlayerFromID(id) return call(getResourceFromName("game_id"), "getPlayerFromID", tonumber(id)) end function getPlayerID(player) return getElementData(player,"id") end
  11. how could I do a countdown using countdownRec (3) in dxDraw? for example: Local chatterName = GetPlayerName (theplayer) outputChatBox ("*" ..chatterName .. "# fff000 countdown started!" getRootElement (), 255, 0, 0, true) countdownRec (3) end addCommandHandler ("count", color) and then immediately be fired into dwDraw count for all players
  12. How can I make changes the color of my car and the color of headlights and randomly every 5 seconds to type the command /color red = math.random(0, 255) green = math.random(0, 255) blue = math.random(0, 255)
  13. when I type the command / back I did not go back to the AFK and says I'm not AFK " function PosTime(source) local pos1 = getElementPosition(source) if (pos == pos1) then outputChatBox ( "You are AFK use /back to exit AFK mode", source, 0, 255, 0) setElementFrozen (source, true) setElementDimension (source, -- s8) --> setElementData(source, "", 1) else outputChatBox ( "You moved", source, 255, 0, 0) end end function afkGo(source) pos = getElementPosition(source) outputChatBox ( "Wait 5 seconds without moving", source, 0, 255, 0) setTimer(PosTime,5000,1,source) end addCommandHandler('afk', afkGo) function afkExit(source) local away = getElementData(source, "back") if (away == 0) then outputChatBox ( "", source, 0, 255, 0) if isElementFrozen ( source ) and getElementData(player,"back") then setElementFrozen ( source, false ) setElementDimension (source,0) setElementData (source,"back",0) else outputChatBox ( "Dont AFK", source, 0, 255, 0) end end end end addCommandHandler('back', afkExit) function awayList(source) local connectedPlayers = getElementsByType ( "player" ) for i, aPlayer in ipairs(connectedPlayers) do local afk = getElementData(aPlayer, "afk") if (afk == 1) then outputChatBox ( "tst", source) end end end addCommandHandler('dbug1', awayList)
  14. Does anyone have a script that does the following methods: / ask | QUESTION [The Player "..getPlayerName .." started a vote: "Question"] and the other players can vote / yes and / no example: The Player "..getPlayerName .." voted / yes The Player "..getPlayerName .." Voted / no And when a player already voted and try to vote again appear: You have already voted! and then at the end appear the vote
  15. just english here. You could have a more complex code? For example do so that as few players who have a gang can do this command?
  16. Poderia mandar um codigo mais complexo ? Por exemplo faze-lo que sómente os jogadores que possuir uma Gangue / Grupo possam fazer este comando ?
  17. I was looking for a server when I saw this: what is it? Print: http://prntscr.com/718x9l
  18. How can I make a script that adds a column in the scoreboard named "Class" and I can increase my class using / class Soldier / class Capitan ...? call ( getResourceFromName ( "scoreboard" ), "scoreboardAddColumn", "My Class" ) -- Note that this syntax is also valid exports.dxscoreboard:scoreboardAddColumn( "My Class" )
  19. Not a stolen resource
  20. i would like to make could add a post to the gang member as / gangclass Leader / Commander / Member etc ..
  21. Example: Gang Script: function criarGang ( source, commandName, teamName ) local getaMoney = getPlayerMoney (source) if teamName then if getaMoney <5000 then outputChatBox("#7d26cd[sERVER] #FF0000Você não tem dinheiro suficiente para criar uma gang valor 5000$",source,255,255,255,true) else if ( getPlayerTeam(source) ~= false ) and ( countPlayersInTeam(getPlayerTeam(source)) == 1 ) then destroyElement(getPlayerTeam(source)) outputChatBox("#F4A460[sERVER]#F08080 Sua gang antiga foi deletada e foi criada uma nova!",source,255,255,255,true) end local newTeam = createTeam ( teamName) if newTeam then takePlayerMoney (source,300 ) local getGang = getTeamName ( newTeam ) setTeamColor (newTeam,math.random(0,255), math.random(0,255), math.random(0,255)) setPlayerTeam ( source, newTeam ) local playerTeam = getPlayerTeam( source ) outputChatBox("#43CD80[GANG] #FFFFFFGang criada com sucesso!",source, 255, 255, 255, true) end end else outputChatBox("#43CD80[GANG] #FFFFFFUso correto: /gangcriar [nome]",source,255,255,255,true) end end addCommandHandler("gangcriar",criarGang) addEventHandler("onPlayerLogin",root,function() local team = getAccountData (getPlayerAccount(source), "team") if (team==getTeamName(getTeamFromName(team))) then setPlayerTeam(source, getTeamFromName(team)) end end) function save() local team = getPlayerTeam(source) local account = getPlayerAccount(source) if not isGuestAccount(account) then if(team)then setAccountData(account, "team", getTeamName(team)) end end end addEventHandler("onPlayerLogout", root, save) addEventHandler("onPlayerQuit", root, save) function sairDaGang(source) local playerTeam = getPlayerTeam (source) if (playerTeam) then setPlayerTeam (source, nil) outputChatBox("#43CD80[GANG] #FFFFFFVocê saiu da gang",source,255,255,255,true) else outputChatBox("#43CD80[GANG] #ffffffVocê não tem gang",source,255,255,255,true) end end addCommandHandler("gangsair", sairDaGang) function desfazerGang (source) local playerVeri = getPlayerTeam (source) if (playerVeri) then destroyElement (playerVeri) outputChatBox("#43CD80[GANG] #FFFFFFVocê deletou sua gang",source,255,255,255,true) else outputChatBox("#43CD80[GANG] #FFFFFFVocê não tem gang",source,255,255,255,true) end end addCommandHandler("gangdeletar", desfazerGang) function enviarGang(source,cmd,targetPlayer) local target = getPlayerFromParticalName (targetPlayer) local geta = getPlayerFromName (target) gang = getPlayerTeam (source) local getName = getTeamFromName(source) lala = getTeamName(source) local convidado = true setElementData(target, "gangConvite", gang, false) if gang == getName then outputChatBox("#43CD80[GANG] #FFFFFFVocê não pertence a nenhuma gang",source, 255, 255, 255, true) else outputChatBox("#43CD80[GANG] #FFFFFFConvite de recrutamento enviado para "..targetPlayer,source, 255, 255, 255, true) outputChatBox("#FF0000[GANG] #AAAAAAVocê foi convidado para a gang #fff000" ..getTeamName(gang).. " #aaaaaa use #FFF000/gangaceitar #AAAAAApara entrar na Gang: #7d26cd "..getTeamName(gang),target, 255, 255, 255, true) end end addCommandHandler("gangconvidar", enviarGang) function Recrutamento(source) local gangConvite = getElementData(source, "gangConvite") if isElement(gangConvite) then outputChatBox("#43CD80[GANG] #FFFFFFVocê entrou na gang "..getTeamName(gang),source, 255, 255, 255, true) setPlayerTeam (source, gangConvite) else outputChatBox("#43CD80[GANG] #FFFFFFVocê não foi convidado para nenhuma gang",source, 255, 255, 255, true) end end addCommandHandler("gangaceitar",Recrutamento) function gangCommands(thePlayer) outputChatBox ( "#7d26cd[GANG] #ffffffUse /gangcriar ||sair|>Player<|aceitar|deletar|sair|convidar||", thePlayer, 255, 255, 255, true ) end addCommandHandler ( "gang", gangCommands ) function getPlayerFromParticalName(thePlayerName) local thePlayer = getPlayerFromName(thePlayerName) if thePlayer then return thePlayer end for _,thePlayer in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), thePlayerName:lower(), 1, true) then return thePlayer end end return false end
×
×
  • Create New...