kevincouto6

Members
  • Content Count

    226
  • Joined

  • Last visited

Community Reputation

2 Neutral

1 Follower

About kevincouto6

  • Rank
    Trick

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I tried to find a solution but I couldn't, like it works correctly but for players who do not have a team, and this error bad argument @'getteamfromName (expected string at argument 1, got bolean) with what I did until check individually, but when removing remove try to do with all zonapvp = createColRectangle ( 5441.9, -1926.4, 119.5, 133 ) event_iniciado = 1 verificarOne = 0 local spawns = { { 5460.70264, -1825.30945, 10.97057 }, { 5454.74805, -1884.13953, 10.29621 }, { 5537.57373, -1887.13306, 11.04092 }, { 5545.14746, -1829.44873, 10.29401 }, { 5501.95557, -1861.66174, 10.29621 } } function start_admin_event (player) if event_iniciado == 1 then local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Owner" ) ) then outputDebugString ("Evento Iniciado") event_iniciado = event_iniciado +1 i = 0 pvp_1 = createTeam("PVP-Red [use /pvp]", 255, 0, 0) pvp_2 = createTeam("PVP-Green [use /pvp]", 0, 255, 0) pvp_3 = createTeam("PVP-Blue [use /pvp]", 0, 0, 255) pvp_4 = createTeam("PVP-Yellow [use /pvp]", 255, 255, 0) addCommandHandler ( "pvp", tele ) end else outputChatBox("The event is already activated", player, 255, 0, 0) end end addCommandHandler ( "eventStart", start_admin_event ) function entrar_na_zona( thePlayer, matchingDimension ) if getElementType ( thePlayer ) == "player" then --outputChatBox( "Working One" ) redirecionar_team (thePlayer ) end end addEventHandler("onColShapeHit", zonapvp, entrar_na_zona) function sair_da_zona( thePlayer, matchingDimension ) if getElementType ( thePlayer ) == "player" then --outputChatBox( "Working Two" ) retirar_team (thePlayer ) end end addEventHandler("onColShapeLeave", zonapvp, sair_da_zona) function tele(player) local teles = math.random ( #spawns ) if ( teles ) then local isTeamPlayer = getPlayerTeam ( player ) if ( isTeamPlayer ) then setElementData(player,"inPVP",true) setElementData ( player, "SavedTeam", getTeamName ( getPlayerTeam ( player ) ) ) --outputDebugString (" inPVP ativado ") else --outputDebugString ("Esse playe foi pro pvp mas não tem team") verificarOne = verificarOne +1 end setElementPosition(player, unpack ( spawns [ teles ] )) end end function redirecionar_team (thePlayer) playerTeam = getPlayerTeam(thePlayer) i = i + 1 if i > 4 then i = 1 end if pvp_1 and pvp_2 and pvp_3 and pvp_4 then if i == 1 then setPlayerTeam ( thePlayer, pvp_1 ) end if i == 2 then setPlayerTeam ( thePlayer, pvp_2 ) end if i == 3 then setPlayerTeam ( thePlayer, pvp_3 ) end if i == 4 then setPlayerTeam ( thePlayer, pvp_4 ) end end end function retirar_team (player) if verificarOne == 1 then setPlayerTeam ( player, nil ) --outputDebugString ("nao tem time") verificarOne = 0 else local t = getElementData ( player, "SavedTeam" ) outputDebugString ("tem timer") setPlayerTeam ( player, getTeamFromName ( t ) ) setElementData(player,"SavedTeam",false) --outputDebugString ("tem time") end end addCommandHandler("stop123", function (player) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Owner" ) ) then if event_iniciado >= 2 then for k , v in ipairs(getElementsByType("player")) do if getElementData(v,"inPVP") then retirar_team (v) end end for i, team in ipairs(getElementsByType("team")) do destroyElement(team) end removeCommandHandler ( "pvp" ) event_iniciado = 1 else outputChatBox("Unable to stop because it was not started", player, 255, 0, 0) end end end)
  2. Basically it is a script where the player uses the command and is moved to a team, when the player dies in the event wanted him to return to his old team, but is saving one on top of the other when more than 1 players use the commando. Like each time the player uses the command of the event, and removed the information playerTeam = getPlayerTeam (player), however if several players use will not save each one individually then, type accurate that each player returns to the team that was, not to the team of the last player who used the commando. Can you tell me how to do it? currently no debug errors ... Sincerely Kevin zonapvp = createColRectangle ( 5441.9, -1926.4, 119.5, 133 ) event_iniciado = 1 local spawns = { { 5460.70264, -1825.30945, 10.97057 }, { 5454.74805, -1884.13953, 10.29621 }, { 5537.57373, -1887.13306, 11.04092 }, { 5545.14746, -1829.44873, 10.29401 }, { 5501.95557, -1861.66174, 10.29621 } } function start_admin_event (player) if event_iniciado == 1 then local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Owner" ) ) then outputDebugString ("Evento Iniciado") event_iniciado = event_iniciado +1 i = 0 pvp_1 = createTeam("PVP-Red [use /pvp]", 255, 0, 0) pvp_2 = createTeam("PVP-Green [use /pvp]", 0, 255, 0) pvp_3 = createTeam("PVP-Blue [use /pvp]", 0, 0, 255) pvp_4 = createTeam("PVP-Yellow [use /pvp]", 255, 255, 0) addCommandHandler ( "pvp", tele ) end else outputChatBox("O evento ja esta ativado", player, 255, 0, 0) end end addCommandHandler ( "eventStart", start_admin_event ) function entrar_na_zona( thePlayer, matchingDimension ) if getElementType ( thePlayer ) == "player" then outputChatBox( "Working One" ) redirecionar_team (thePlayer ) end end addEventHandler("onColShapeHit", zonapvp, entrar_na_zona) function sair_da_zona( thePlayer, matchingDimension ) if getElementType ( thePlayer ) == "player" then outputChatBox( "Working Two" ) retirar_team (thePlayer ) end end addEventHandler("onColShapeLeave", zonapvp, sair_da_zona) function tele(player) local teles = math.random ( #spawns ) if ( teles ) then setElementPosition(player, unpack ( spawns [ teles ] )) end end function redirecionar_team (thePlayer) playerTeam = getPlayerTeam(thePlayer) i = i + 1 if i > 4 then i = 1 end if pvp_1 and pvp_2 and pvp_3 and pvp_4 then if i == 1 then setPlayerTeam ( thePlayer, pvp_1 ) end if i == 2 then setPlayerTeam ( thePlayer, pvp_2 ) end if i == 3 then setPlayerTeam ( thePlayer, pvp_3 ) end if i == 4 then setPlayerTeam ( thePlayer, pvp_4 ) end end end function retirar_team (player) setPlayerTeam ( player, playerTeam ) end addCommandHandler("stop123", function (player) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Owner" ) ) then if event_iniciado >= 2 then destroyElement ( pvp_1 ) destroyElement ( pvp_2 ) destroyElement ( pvp_3 ) destroyElement ( pvp_4 ) removeCommandHandler ( "pvp" ) event_iniciado = 1 retirar_team () else outputChatBox("Não possivel parar, porque não foi iniciado", player, 255, 0, 0) end end end)
  3. function onWasted(totalAmmo, killer, killerWeapon, bodypart, stealth) local ContaDoPlayer = getPlayerAccount ( source ) if (isGuestAccount ( ContaDoPlayer ) then --deixe em branco else local theWeapon = getPedWeapon (source) local weaponAmmo = getPedTotalAmmo (source) takeAllWeapons(source) setPlayerWantedLevel(source, 0) setTimer (spawnPlayer, 1000, 1, source, 1158.344, -1293.679, 16.445, 0, getElementModel (source), 0, 0, getPlayerTeam(source)) fadeCamera ( source, false, 0, 0, 0, 0 ) setTimer ( fadeCamera, 2000, 1, source , true, 0.5 ) setTimer ( setCameraTarget, 1250, 1, source ) end end addEventHandler ("onPlayerWasted", getRootElement(), onWasted) Olá, costumo sempre pedir ajuda aqui, e em um dos meus posts, me recomendaram evitar o uso de if not, então use else assim quando não estiver, vai funcionar. Ouvi isso faz algum tempo espero que tenha ajudado. Alguem com mais experiência pode confirmar oq eu falei para ter certeza....
  4. Entendi o que você quis dizer, porem acho que agr não e mais necessario eu puxei as funções para fora assim elas funcionam para todos, porem agora tenho outra dificuldade .. Tipo cada vez que o jogador usa o commando o evento, e retirado a informação playerTeam = getPlayerTeam(player), porem se varios player usarem não vai salvar individualmente a de cada um então, tipo preciso que cada player retorne ao time que estava, não ao team do ultimo player que usou o commando. sabe me dizer como faze-lo ? zonapvp = createColRectangle ( 5441.9, -1926.4, 119.5, 133 ) event_iniciado = 1 local spawns = { { 5460.70264, -1825.30945, 10.97057 }, { 5454.74805, -1884.13953, 10.29621 }, { 5537.57373, -1887.13306, 11.04092 }, { 5545.14746, -1829.44873, 10.29401 }, { 5501.95557, -1861.66174, 10.29621 } } function start_admin_event (player) if event_iniciado == 1 then local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Owner" ) ) then outputDebugString ("Evento Iniciado") event_iniciado = event_iniciado +1 i = 0 pvp_1 = createTeam("PVP-Red [use /pvp]", 255, 0, 0) pvp_2 = createTeam("PVP-Green [use /pvp]", 0, 255, 0) pvp_3 = createTeam("PVP-Blue [use /pvp]", 0, 0, 255) pvp_4 = createTeam("PVP-Yellow [use /pvp]", 255, 255, 0) addCommandHandler ( "pvp", tele ) end else outputChatBox("O evento ja esta ativado", player, 255, 0, 0) end end addCommandHandler ( "eventStart", start_admin_event ) function entrar_na_zona( thePlayer, matchingDimension ) if getElementType ( thePlayer ) == "player" then outputChatBox( "Working One" ) redirecionar_team (thePlayer ) end end addEventHandler("onColShapeHit", zonapvp, entrar_na_zona) function sair_da_zona( thePlayer, matchingDimension ) if getElementType ( thePlayer ) == "player" then outputChatBox( "Working Two" ) retirar_team (thePlayer ) end end addEventHandler("onColShapeLeave", zonapvp, sair_da_zona) function tele(player) local teles = math.random ( #spawns ) if ( teles ) then setElementPosition(player, unpack ( spawns [ teles ] )) end end function redirecionar_team (thePlayer) playerTeam = getPlayerTeam(thePlayer) i = i + 1 if i > 4 then i = 1 end if pvp_1 and pvp_2 and pvp_3 and pvp_4 then if i == 1 then setPlayerTeam ( thePlayer, pvp_1 ) end if i == 2 then setPlayerTeam ( thePlayer, pvp_2 ) end if i == 3 then setPlayerTeam ( thePlayer, pvp_3 ) end if i == 4 then setPlayerTeam ( thePlayer, pvp_4 ) end end end function retirar_team (player) setPlayerTeam ( player, playerTeam ) end addCommandHandler("stop123", function (player) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Owner" ) ) then if event_iniciado >= 2 then destroyElement ( pvp_1 ) destroyElement ( pvp_2 ) destroyElement ( pvp_3 ) destroyElement ( pvp_4 ) removeCommandHandler ( "pvp" ) event_iniciado = 1 retirar_team () else outputChatBox("Não possivel parar, porque não foi iniciado", player, 255, 0, 0) end end end)
  5. Eai, preciso de ajuda aqui, estou tentando desenvolver um evento, para todos jogadores, mas que só o admin pode inicia-lo com o comando. Basicamente só esta funcionando com o jogador que cria o evento, tipo só o Admin. Para Finalizar o evento a mesma coisa, só finaliza para o Admin que iniciou. Server-side event_iniciado = 1 local spawns = { { 5460.70264, -1825.30945, 10.97057 }, { 5454.74805, -1884.13953, 10.29621 }, { 5537.57373, -1887.13306, 11.04092 }, { 5545.14746, -1829.44873, 10.29401 }, { 5501.95557, -1861.66174, 10.29621 } } function start_admin_event (player) if event_iniciado == 1 then event_iniciado = event_iniciado +1 local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Owner" ) ) then zonapvp = createColRectangle ( 5441.9, -1926.4, 119.5, 133 ) function entrar_na_zona( theElement, matchingDimension ) if ( theElement == player ) then outputChatBox( "Working One" ) redirecionar_team (player) end end addEventHandler("onColShapeHit", zonapvp, entrar_na_zona) function sair_da_zona( theElement, matchingDimension ) if ( theElement == player ) then outputChatBox( "Working Two" ) retirar_team (player) end end addEventHandler("onColShapeLeave", zonapvp, sair_da_zona) outputDebugString ("Evento Iniciado") i = 0 pvp_1 = createTeam("PVP-Red [use /pvp]", 255, 0, 0) pvp_2 = createTeam("PVP-Green [use /pvp]", 0, 255, 0) pvp_3 = createTeam("PVP-Blue [use /pvp]", 0, 0, 255) pvp_4 = createTeam("PVP-Yellow [use /pvp]", 255, 255, 0) addCommandHandler ( "pvp", tele ) end else outputChatBox("O evento ja esta ativado", player, 255, 0, 0) end end addCommandHandler ( "startEvent", start_admin_event ) function tele(player) local teles = math.random ( #spawns ) if ( teles ) then setElementPosition(player, unpack ( spawns [ teles ] )) end end function redirecionar_team (thePlayer) playerTeam = getPlayerTeam(thePlayer) i = i + 1 if i > 4 then i = 1 end if pvp_1 and pvp_2 and pvp_3 and pvp_4 then if i == 1 then setPlayerTeam ( thePlayer, pvp_1 ) end if i == 2 then setPlayerTeam ( thePlayer, pvp_2 ) end if i == 3 then setPlayerTeam ( thePlayer, pvp_3 ) end if i == 4 then setPlayerTeam ( thePlayer, pvp_4 ) end end end function retirar_team (player) setPlayerTeam ( player, playerTeam ) end addCommandHandler("stopEvent", function (player) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Owner" ) ) then if event_iniciado >= 2 then destroyElement ( zonapvp ) destroyElement ( pvp_1 ) destroyElement ( pvp_2 ) destroyElement ( pvp_3 ) destroyElement ( pvp_4 ) removeCommandHandler ( "pvp" ) event_iniciado = 1 retirar_team () else outputChatBox("Não possivel parar, porque não foi iniciado", player, 255, 0, 0) end end end)
  6. I need help to verify, if the name is listed in the table but it is not working, thx since now ! tableNamePlayersTFO = { {theBlack}, {Alpicture}, {Delmon} }, MarkerTFO = createMarker ( 2772.85, -2514.28, 13.63 - 1, 'cylinder', 5.0, 255, 0, 0, 0 ) MarkerTwoTFO = createMarker ( 2767.72, -2518.99, 13.64 - 1, 'cylinder', 5.0, 255, 0, 0, 0 ) function SetSkinTFO(player) if getElementData(player,'vipskin') == true then else if getElementType ( player ) == "vehicle" then else if getPlayerName ( player ) == ( tableNamePlayersTFO ) then if (getPlayerSkin(player) == 290) then else setPlayerSkin(player, 290) end else local PlayerTeamTFO = getPlayerTeam ( player ) local TeamNTFO = getTeamFromName ( "The First Order" ) if isElementWithinMarker ( player, MarkerTFO ) or isElementWithinMarker ( player, MarkerTwoTFO ) then if PlayerTeamTFO == TeamNTFO then if (getPlayerSkin(player) == 288) then else setPlayerSkin(player, 288) end end end end end end end addEventHandler("onMarkerHit", MarkerTFO, SetSkinTFO) addEventHandler("onMarkerHit", MarkerTwoTFO, SetSkinTFO)
  7. @asrzk Olá, hoje quando fui testar o script, não funcionou, continua com o dano normal
  8. Pesei assim tmb, mas não funciona, pede para criar um createWeapon se eu usar esta função, vai criar weapon, mas não vou poder usar arma em si. Poderia tentar eu verificario o player, o grupo, e se é a desert deagle, mas como eu modificaria o dano para funcionar em PED e em Players ?
  9. Este pode te ajudar aqui tem bastante coisas em português, acho que quase toda wiki ( Server Scripting Events / Client Scripting Events e mais outras coisas) < Referência ) acho que pode te ajudar link >>>>> https://wiki.multitheftauto.com/wiki/Página_Inicial
  10. Estava, fazendo um teste com setWeaponProperty, e dei de cara com desafio, será que e possível ativar apenas para um jogador, tipo um arma especifica para cada jogador. tentativas Tentei expecificar o player e do grupo ADMIN. verifiquei pelo NOME player. porem acho que o problema e em si no setWeaponProperty, tipo "weaponSkill: Either: "pro", "std" or "poor". The player must have this skill level set to have the effect.", ele ativa para um class de jogador tipo, pensei em fazer no lado client pois não entendi como funciona, ao meu ver vou ter que criar um "weapon", ou algo do tipo. estava pensando em criar um "função" para botar no lugar de "PRO" "STD" "POOR", que funcione apenas par um, mas não sei como fazer. (posso estar viajando, (falando besteira) ) se existir outro modo podem me ensinar ? Obrigado desde já ! createPed ( 120, -2422, -610, 132 ) function desertWeaponEdited ( playerSource ) if ( playerSource ) then local theAccount = getPlayerAccount( playerSource ) if theAccount then local accountName = getAccountName( theAccount ) if isObjectInACLGroup("user." .. accountName, aclGetGroup ( "Owner", "Moderator" ) ) then if getPlayerName ( playerSource ) == ( "mane321" ) then setWeaponProperty(24,"pro", "damage", 500) outputChatBox("Funcionou, Arma Admin Adicionada") end end end end end addCommandHandler ( "desertWeapon", desertWeaponEdited ) para apenas um player
  11. @#DaNiLiN Já tentou fazer uma verificação para cada tela, e definir um valo a size tipo assim if guiGetScreenSize() = ( 1366 , 768 ) then size = 5 else if guiGetScreenSize() = ( 1280 , 768 ) then size = 4.7 else if guiGetScreenSize() = ( 1280 , 720 ) then size = 4.4 else if guiGetScreenSize() = ( 1280 , 600 ) then size = 4.1 else if guiGetScreenSize() = ( 1024 , 768 ) then size = 3.8 else if guiGetScreenSize() = ( 800 , 600 ) then size = 3.5 else if guiGetScreenSize() = ( 656 , 496 ) then size = 3.2 else if guiGetScreenSize() = ( 640 , 480 ) then size = 2.9 else size = 5 end end end end end end end end Assim depois basta usar, o valor de size, obs: não sei se é o jeito correto, mas acho que vale apena tentar clear = dxCreateFont( "segoeui.ttf", size ) dxDrawText("Test Text", x*0.4,y*0.65,x,y,tocolor(255,255,255,255), size, clear,"left","top",false,false,true,true,true)
  12. Porém voçê usa no size, tipo assim clear = dxCreateFont( "segoeui.ttf", (x)*20 ) dxDrawText("Test Text", x*0.4,y*0.65,x,y,tocolor(255,255,255,255),1,clear,"left","top",false,false,true,true,true)
  13. Olá obgd pela ajuda, funcionou porem use apenas (x)* 5, quando eu usava ( x / y )*5, ficava muito grande na resolução 640/480, então use assim local screenW,screenH = guiGetScreenSize() local resW,resH = 1366,768 local x,y = (screenW/resW), (screenH/resH) function Dx () dxDrawRectangle(x*0, y*315, x*1366, y*150, tocolor(0, 0, 0, 239), false) dxDrawText(" ## Mission Complete ! ##", x*0, y*320, x*1366, y*150, tocolor(254, 5, 5, 254), (x)*5, "beckett", "left", "top", false, false, false, false, false) end function Fim_Mission () addEventHandler("onClientRender", root, Dx) setTimer(function() removeEventHandler("onClientRender", root, Dx) end, 10000, 1) end addCommandHandler("teste", Fim_Mission) 1366 / 768 640 / 480 Queria apenas uma ultima opnião se esta tudo correto
  14. Show de Bola esse Vídeo, Pude ver vários erros que cometi, ehhehe ( vlw pelo video )
  15. então estava testando e funcionou no (dxDrawRetangle), pelo que entendi não é possivel redimensionar o texto, então existe outra forma de fazer ? nos testes com o quadro funcionou mas não com o texto, local screenW,screenH = guiGetScreenSize() local resW,resH = 1366,768 local x,y = (screenW/resW), (screenH/resH) function Dx () dxDrawRectangle(x*0, y*315, x*1366, y*192, tocolor(0, 0, 0, 239), false) dxDrawText(" Mission Complete !", x*209, y*320, x*1151, y*188, tocolor(254, 5, 5, 254), 5.00, "beckett", "left", "top", false, false, false, false, false) end function Fim_Mission () addEventHandler("onClientRender", root, Dx) setTimer(function() removeEventHandler("onClientRender", root, Dx) end, 10000, 1) end addCommandHandler("teste", Fim_Mission) Imagem de como ficou O erro do debug ja foi resolvido "so pra avisar"