Jump to content

yMassai

Members
  • Posts

    382
  • Joined

  • Last visited

Everything posted by yMassai

  1. yMassai

    GetSkin

    local playermoney = 600 addEvent ( "GetSkin", true ) addEventHandler ( "GetSkin", getRootElement(), function (modelo) g_playerMoney = getPlayerMoney(source) skinget = setElementModel(source, tonumber(modelo)) if (g_playerMoney < 600) then return false end takePlayerMoney(source,tonumber(playermoney)) end ) this part of server-side is presenting problems. money the player is removed but the skin is given, someone could help me?
  2. você quer apenas uma verificação do nome e se obtiver o tag por exemplo: [sABR] seja movido para o team Staff? o team já é existente ou ele será criado quando o recurso for iniciado? quando ele entrar no jogo, logar ou disparar um comando, explique melhor por favor.
  3. Não se preocupe, se obtiver dúvidas sobre oque usar para fazer tal recurso solicite explicações na pagina portuguesa de script. Sobre janela eu postei um Tutorial na pagina de tutoriais mostra a função "guiCreateWindow" que cria a janela e algumas funções complementares a janela e a "bindKey" que abre a janela através de uma tecla. O pouco que sei posso explicar.
  4. player_money = getPlayerMoney(source) player_account = getPlayerAccount(source)
  5. bullet_m4 and price_m4 is variables, are the price of the gun and bullets. local price_m4 = 18000 -- price weapon local bullet_m4 = 300 -- price bullets
  6. elseif(weapon_name == "weapon_m4") then if(player_money >= price_m4) then takePlayerMoney(source, price_m4) setAccountData(player_account, "m4data", true) if(not getAccountData(player_account, "m4data")) then return end if(player_money >= bullet_m4) then giveWeapon(source, 31, 50) takePlayerMoney(source, bullet_m4) outputChatBox("Você comprou uma M4.", source, 0, 255, 0) else outputChatBox("Você não tem dinheiro para comprar uma M4.", source, 255, 0, 0) end end end I am having trouble in this little snippet. My goal is to provide the player to purchase a gun and its bullets. but when i start only the gun is purchased when the button is pressed. I want to buy the weapon ​​and when the player presses the button again buy the bullets.
  7. https://community.multitheftauto.com/ind ... ls&id=5161
  8. inicie o script e quando surgir duvidas ou erros poste na pagina portuguesa de scripts.
  9. Isto geralmente ocorre com os brasileiros mas venho notando que uma grande porcentagem de ingleses fazem isso. quando inicio meu server para tentar o funcionamento de algum script geralmente entra alguém pois n tenho o costume de por senha, sempre entra ingleses e sempre me pedem admin. estou certo de que um lançamento de um servidor brasileiro com um bom funcionamento da parte script e uma colaboração administrativa do servidor é lucrativo e tumultuado dependendo da politica do servidor.
  10. https://community.multitheftauto.com/ind ... ls&id=5166
  11. eu acho bem conveniente colocar um sistema de login e se achar conveniente coloque um recurso para salvar os dados da conta.
  12. para que você se certifique que o jogador esta logado apenas ponha um script do sistema de login/ register e se não tiver adicione o comando /logout para surgir a janela de login.
  13. Eu realmente n entendi que você falou, você fala que não ha um subforum português aqui mas esta pagina ja é o subforum português. Eu não questionei o lugar que você postou e sim oque você escreveu ao decorrer do tópico e também o titulo. entenda que n tem um porque de haver uma briga, apenas estou tentando ressaltar a lei que proibe propagandas.
  14. Desculpe mas n aleguei nada, não compete a mim julgar as postagens, eu diria para você ler as regras, isto é apenas uma dica.
  15. Aqui também é permitido sim. Seria melhor você postar aqui se quiser divulgar para mais linguagens. Não sei dizer se é permitido fazer postagens sobre o "SAMP" pois pode ser considerado uma propaganda e é ilegal fazer propagandas de produtos n relacionados ao MTA.
  16. https://community.multitheftauto.com/ind ... ls&id=5140
  17. Embora eu não foque na área de servidores Race sei que é bem complicado, os administradores pegão recursos para download e como de costume trocam a autoria. Eu não sou nenhum Scripter mas posso garantir que se você tiver alguma duvida tentaremos esclarecer elas, n somente eu mas os participantes da Pagina em Português de Scripts. Aproposito seja Bem Vindo na comunidade e espero ver você por aqui!
  18. function onPlayerQuit ( ) local jogadoracc = getPlayerAccount ( source ) if ( jogadoracc ) and not isGuestAccount ( jogadoracc ) then setAccountData ( jogadoracc, "army.job", armyFA ) end end function onPlayerLogin (_, jogadoracc ) if ( jogadoracc ) then local playermoney = getAccountData ( jogadoracc, "army.job" ) if ( armyFA ) then setElementData ( jogadoracc, "aemy.job", armyFA ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin) assim?
  19. aqui eu utilizei o setElementData setElementData( source, "Ocupação", "Forças Armadas", true ) isso da uma ocupação no scoreboard como eu posso salvar a ocupação do jogador quando sair do jogo e entrar na mesma conta?
  20. Staff é um team já criado em outro script, não é o nome do evento mas sim o nome do team. ------ Janela ------ function MilitarArmy() janelaArmy = guiCreateWindow(260,180,300,250,"",false) guiWindowSetSizable(janelaArmy,false) guiSetVisible (janelaArmy, false ) --label armylabel = guiCreateLabel(15,30,300,300,"....",false,janelaArmy) ---botões botaok = guiCreateButton(10,210,135,20,"OK",false,janelaArmy) botaoc = guiCreateButton(158,210,135,20,"Cancelar",false,janelaArmy) end addEventHandler( "onClientResourceStart", resourceRoot, MilitarArmy) ------ Ped e Marker------ armyped = createPed(287, 94.12652, 1916.45544, 18.04716, 90) armymarker = createMarker( 94.12652, 1916.45544, 17.04716, "cylinder", 1.5, 0, 255, 0, 170) setElementFrozen ( armyped, true ) addEventHandler ( "onClientPedDamage", armyped, cancelEvent ) ---- Funções ----- function armyjob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(janelaArmy) then showWindow(true) end end end addEventHandler("onClientMarkerHit", armymarker, armyjob) addEventHandler('onClientGUIClick', root, function () if (source == botaoc ) then showWindow(false) elseif (source == botaok ) then showWindow(false) triggerServerEvent("armyFA",localPlayer) end end ) function showWindow(show) guiSetVisible(janelaArmy, show) showCursor(show) end function joinArmy() setPlayerTeam(source,Staff) setElementModel(source, 287) giveWeapon ( source, 3 ) setElementData( source, "Ocupação", "Forças Armadas", true ) outputChatBox("Você se juntou ao grupo das Forças Armadas.",source,0,255,0) end addEvent("armyFA", true) addEventHandler("armyFA",root,joinArmy)
  21. Utilizando o "setPlayerTeam" como posso dar um team já existente para um jogador? um exemplo: setPlayerTeam(source,Staff) o jogador n pega o team, como posso fazer pegar um team já criado em outro recurso?
  22. você poderia me explicar mais sobre root?
  23. ------ Janela ------ function MilitarArmy() janelaArmy = guiCreateWindow(260,180,300,250,"",false) guiWindowSetSizable(janelaArmy,false) guiSetVisible (janelaArmy, false ) --label armylabel = guiCreateLabel(15,30,300,300,"....",false,janelaArmy) ---botões botaok = guiCreateButton(10,210,135,20,"OK",false,janelaArmy) botaoc = guiCreateButton(158,210,135,20,"Cancelar",false,janelaArmy) end addEventHandler( "onClientResourceStart", root, MilitarArmy) ------ Ped e Marker------ armyped = createPed(287, 94.12652, 1916.45544, 18.04716, 90) armymarker = createMarker( 94.12652, 1916.45544, 17.04716, "cylinder", 1.5, 0, 255, 0, 170) setElementFrozen ( armyped, true ) addEventHandler ( "onClientPedDamage", armyped, cancelEvent ) ---- Funções ----- function armyjob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(janelaArmy) then guiSetVisible(janelaArmy, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", armymarker, armyjob) addEventHandler('onClientGUIClick', root, function () if (source == botaoc ) then guiSetVisible ( janelaArmy, false ) showCursor ( false ) if (source == botaok ) then guiSetVisible ( janelaArmy, false ) showCursor ( false ) end end end ) n sei qual é o erro, eu aperto no botão "ok" e não fecha a janela.
  24. https://community.multitheftauto.com/ind ... ls&id=5118
  25. Olá, como ja me foi recomendado postar os recursos postados aqui então irei postar. Este recurso serve para alterar o nível de procurado, com a capacidade de 0 a 6. A janela só surge se o jogador for do grupo ACL "Admin" através do comando /wantedlevel . Devemos agradecer a os participantes da Pagina Portuguêsa de Scripts pela participação crucial no script. Download : https://community.multitheftauto.com/ind ... ls&id=5104 Caso ocorra algum erro favor informar aqui, na comunidade ou diretamente comigo.
×
×
  • Create New...