Jump to content

Search the Community

Showing results for tags 'server'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

  1. I've successfully created a marker that triggers 'givePlayerMoney' and 'outputChatBox' when 'onClientMarkerHit' in a client.Lua. Does the server see the amount of money the player now has? Do I have to sync the money to the server with some kind of 'getPlayerMoney' in a server.Lua? I'm planning on making a weapons GUI that works with the player's money.
  2. Eu Gostaria de saber como faço a compra da TopList para meu servidor, no site da TopList diz que tem 313 servidores na minha frente, eu tenho que esperar a minha vez para chegar um email para mim efetuar a compra?
  3. Boa tarde gente, estou com um problema muito chato! Quando entro em algum servidor, funciona tudo normalmente, porém na maioria das vezes eu não consigo usar algumas funções do jogo/servidor, por exemplo o celular pois não aparece os escritos dos menus no jogo, apenas o layout... alguém já passou por isso? sabe como resolver? segue algumas fotos: https://ibb.co/2q7BBPM https://ibb.co/qmrGvQB https://ibb.co/2q7BBPM https://ibb.co/qmrGvQB Good afternoon guys, I have a very annoying problem! When I enter a server, everything works normally, but most of the time I am unable to use some functions of the game/server, for example: the cellphone because the menu scripts do not appear in the game, only the layout... someone has already gone through that? know how to solve? Here are some pictures:
  4. Salutare ? Am deschis serverul SwordGaming va asteptam pe server daca vreti ceva unic si frumos! ss: https://prnt.sc/qw4r1c IP : mtasa://185.248.199.125:22003 discord:https://discord.gg/hFKnVNz
  5. We all know that cheaters and hackers are not people you want on your server, or on any server for that matter. In order to prevent these people who get banned on one server for cheating, hacking (or just being a dickhead) from joining another server and doing the exact same, ruining the game for other players I have developed Bansync. Bansync is a way for a server owner to both contribute, and profit from a ban database, somewhat similar to how VAC works. Where getting banned from one server would mean you get banned from others as well. Anyone can sign up to join bansync as a server, and contribute to the database. And as a server owner you will be able to specify per server what types of bans you want to enforce on your server. ( See screenshot in spoiler below) Besides just being a ban database, it's also a platform for people to appeal their bans which were handed out using bansync. When an appeal is accepted the ban is automatically lifted and the player will be able to play on any servers enforcing bansync. Bansync runs as a website at https://bans.nanobob.net/ , once you sign up for a server account you will have information on how to implement bansync available on your admin dashboard. I welcome any questions, and encourage you to browse the website, it contains a more detailed and in depth explanation of the project. I would also like to ask for anyone who is interested and owns a server, or plays on a server which you think should be hacker free, to implement this, or ask the developers to implement bansync. This way we can make the MTA community just a bit nicer for everyone. Screenshots:
  6. Im working on a roleplay server and I always test the resources in local host server, however I have just noticed today that the freshly added resources are not even running on the server, only the older ones. Ive tried to start them with command but the server just cant find 'em while they are clearly there.. Currently there are maybe 20 resources running on the server.. The only thing what came to my mind was maybe there is a limitation of usable resorces for local servers..
  7. Ai Galera da uma força no meu 1 server de MTA ! da uma passadinha la e de aquela moral PCC -ON | CV- ON | EB- ON | CHOQUE- ON Sistema de Voz ''Z'' 198.50.195.141:22173
  8. Hello! Weeks ago I got some MTA:SA server. First of all - the name is Polish - because it was meant to be Polish server which would be Freeroam/Play. Now - changed it to RACE - and here it is! This server is a classic race server [race with checkpoints] [not DM/DD]. There are alot of maps from racing community members/self-made maps. Scripts are from most racing servers - it contain for example: - carhide - carfade - race_nos2 [you can type /nos nfs or /nos hybrid to change your nitro] and lot of other things to come! There are also alot of maps [not only maps from the current MTA release, and not downloaded maps from community.mtasa site] which you can play, make toptimes and other things! If you have a team, we can add it! Tell the admins! We will also have some events. As i'm known in the racing community, the upcoming event is an Enduro Event - on 10.01.2020. Enduro map - is a long map, mainly like from 100-1000 cp's or 100-300 cp's [you know, long races]. The goal is, to like in normal race, win - but you can get special prize for it - moderator, or other thing [we are still thinking]. Pro racers will also attend here, it has been announced on some of their team Discord channels. This server doesen't have lot of scripts. Just because it's very, very similar to popular racing servers nowadays. It's for doing racing Funwars/Clanwars also! You might learn some PRO racing, before this advertisement here, some pros are already playing on the server, so you can learn racing tips for them. The server now [before the advertisement] is active.e We had avearge of 5 players [without advertisement here] on the server - so hope it gets bigger! Join in! mtasa://217.182.198.210:22083 Thank you, and see you there!
  9. Hey guys! Is there any method to make a free mta server? If you can help me, comment down!
  10. então pessoal tento editar a acl do server até consigo porém logo em seguida quando atualizo o filezilla ele some e só consigo ficar com o nome da minha host no console, alguém pode me ajudar por favor?
  11. ♦ Server Name -> → uV|~ [ DM - Deathmatch ] 7/24 International Server. ♣ Server IP ♦ → mtasa://185.255.92.189:22743 ♦ ♣ Admins → uV|~ zfR* → uV|~ Arif|G| → S O O N ♦
  12. [Merkez] http://mtasaturk.com/resim/sunucuadi.png [/ img] → uV | ~ [DM - Deathmatch] 7/24 Uluslararası Sunucu. ♣ [İmg] http://mtasaturk.com/resim/ipadresi.png [/ img] → mtasa: //185.255.92.189: 22743 ♦ [İmg] http://mtasaturk.com/resim/yetkililer.png [/ img] → uV | ~ zfR * → uV | ~ Arif | G | [İmg] http://mtasaturk.com/resim/slogan.png [/ img] → Farkı bizimle yaşayın [İmg] http://mtasaturk.com/resim/website.png [/ img] → Çok Yakında ♦ [İmg] http://mtasaturk.com/resim/ozellikler.png [/ img] → Kaliteli [DM] Mapler İle Sizlerleyiz .. [İmg] http://mtasaturk.com/resim/resim.png [/ img] [İmg] https://i.hizliresim.com/p5Olzn.png [/ img]
  13. ENGLISH: Hello, I need scripters to help me develop the servers in my community, there are 4 servers that will be hosted on December 25, for that reason I need a scripter to help me with the servers. I hope to have your help! SPANISH: Hola, necesito scripters que me ayuden a desarrollar los servidores de mi comunidad, son 4 servidores que se hostearan el 25 de diciembre, por esa razon es que necesito scripter que me ayuden con los servidores. Espero contar con su ayuda, gracias! Help Plis!
  14. No errors / warnings in debugscript 3... then what wrong in this script? Client: requestBrowserDomains({"www.convertmp3.io"}) local browser = createBrowser( 1, 1, false ) local currentSound = {} addEvent( 'Play' , true ) addEventHandler( 'Play' , root , function( link ) local vehicle = getPedOccupiedVehicle ( source ) local x, y, z = getElementPosition(vehicle) currentSound[source] = playSound3D( link, x, y, z ) attachElements(currentSound[source],vehicle) setSoundMaxDistance(currentSound[source],30) setSoundVolume(currentSound[source],50) end ) function fetch(_,url) if url and url ~= "" then fetchRemote("http://www.convertmp3.io/fetch/?format=JSON&video="..url, callback) end end addCommandHandler("p",fetch) function callback(data, error) if (error ~= 0) then return outputChatBox(error) end if (data == "ERROR") then return outputChatBox("data error") end local data = fromJSON("["..data.."]") if (data) then outputChatBox("Title: "..data.title) outputChatBox("Length: "..data.length) outputChatBox("Link: "..data.link) loadBrowserURL( browser, data.link ) end end addEventHandler( "onClientBrowserNavigate", browser, function( link ) if not link:find("www.convertmp3.io") then triggerServerEvent( 'play' , localPlayer , link ) -- trigger the event when the script actially gets the playable link! end end ) server: addEvent( 'play' , true ) addEventHandler( 'play' , root , function( link ) triggerClientEvent( root , 'Play' , client , link ) end )
  15. Olá Pessoal, como fazer para clicar em um veículo e receber no chat uma localização da roda dele? Já tenho a ideia de como usar o getVehicleComponentPosition (algo do lado do cliente), mas como identificar ou veicular o que estou tentando ver no OnElementClicked é do lado Server? function rodadireita (source) local vehicle = --Queria por aqui o veiculo que estou clicando x, y, z = getVehicleComponentPosition ( vehicle , "wheel_rf_dummy", "world") outputChatBox ( "Cordenadas:"..x..", "..y..", "..z, 255, 255, 255, true ) end
  16. Tem como usar o setVehicleComponentScale para aumentar peças do veiculo para todos os players?Tem que usar triggerClientEvent?Tentei usar mas n consegui,n sei usar essa função
  17. Estou querendo fazer um script que quando clico no carro,me mostre as coordenadas da roda,mas a função getVehicleComponentPosition é somente do lado client e não sei jogar elas pro lado serve
  18. estou querendo colocar uns 10 lugares diferentes para spawnar o carro addEvent("WarpMyVehicle", true) addEventHandler("WarpMyVehicle", root, function(id) if not isPedInVehicle (source) then if getElementInterior(source) == 0 then if getPlayerMoney(source) >= tonumber(3500) then local vehicle = getVehicleByID(id) if isElement(vehicle) then takePlayerMoney ( source, 3500 ) local x, y, z = getElementPosition(source) setElementPosition(vehicle, 1649.334, -1079.972, 23.898) outputMessage ("#c1c1c1O seu veiculo #00FF66"..(customCarNames[getElementModel(vehicle)] or getVehicleNameFromModel(getElementModel(vehicle))).." #c1c1c1foi entregue a você.", source, 38, 122, 216, true) else outputMessage("#c1c1c1O seu veiculo não está spawnado.", source, 38, 122, 216, true) end else outputMessage("#c1c1c1Você não tem os meios de se teletransportar para o veiculo.", source, 38, 122, 216, true) end else outputMessage("#c1c1c1Você só poderá mudar de veiculo se sair do atual.", source, 38, 122, 216, true) end else outputMessage("#c1c1c1Nós não podemos dirigir seu veiculo. Por favor, sair do outro veiculo.", source, 38, 122, 216, true) end end)
  19. Boa noite, Estou iniciando um servidor e quero mudar isso, vejo que na tela de busca de outros servidores da para alterar o nome "play" que aparece em modo de jogo do lado direito, para colocar as Siglas do server por exemplo. Não é o modo de jogo dentro do server, é o que aparece ao procurar um servidor! Teriam como me ajudar?
  20. Gostaria de substituir o som de ignição do motor, já fiz um script em que o player consegue ligar de desligar o motor do veículo apertando determinado botão, mas gostaria de colocar um som para que todos aqueles que estiverem perto do carro do player consigam escutar o som da partida. Segue o link de download do som abaixo: https://drive.google.com/open?id=1ylXf3-E-Gw2wxAeIczvBMdLPduDMvh0p Não sei qual código utilizar, se puderem me ajudar agradeço!
  21. Quero criar uma função com que eu resgate o veiculo, preciso de uma função que ao clicar o carro sera teletransportado para um local definido só fiz o local aonde irá clicar: Button_VS_Warp_s = guiCreateStaticImage(381, 98, 166, 25, "images/button_standard.png", false, Window_VS) Button_VS_Warp_o = guiCreateStaticImage(381, 98, 166, 25, "images/button_mouse.png", false, Window_VS) Button_VS_Warp = guiCreateLabel(381, 98, 166, 25, "Resgatar", false, Window_VS) guiSetFont(Button_VS_Warp, "default-bold-small") guiLabelSetColor(Button_VS_Warp, 255, 255, 255) guiLabelSetVerticalAlign(Button_VS_Warp, "center") guiLabelSetHorizontalAlign(Button_VS_Warp, "center") aqui o carro trás até mim, porem não quero que irá até o player elseif source == Button_VS_Warp then if not isInColExport () then triggerServerEvent("WarpMyVehicle", localPlayer, ID)
  22. não consigo remover isso do chat quando alguem morre! http://prntscr.com/p4jemr
  23. estou tentando colocar uma função para que o carro vá para um local em 'Resgatar' Button_VS_Warp_s = guiCreateStaticImage(381, 98, 166, 25, "images/button_standard.png", false, Window_VS) Button_VS_Warp_o = guiCreateStaticImage(381, 98, 166, 25, "images/button_mouse.png", false, Window_VS) Button_VS_Warp = guiCreateLabel(381, 98, 166, 25, "Resgatar", false, Window_VS) guiSetFont(Button_VS_Warp, "default-bold-small") guiLabelSetColor(Button_VS_Warp, 255, 255, 255) guiLabelSetVerticalAlign(Button_VS_Warp, "center") guiLabelSetHorizontalAlign(Button_VS_Warp, "center") -- guiSetFont(Button_VS_Warp_info, "default-bold-small") -- guiLabelSetColor(Button_VS_Warp_info, 255, 255, 255) -- guiLabelSetVerticalAlign(Button_VS_Warp_info, "center") -- guiLabelSetHorizontalAlign(Button_VS_Warp_info, "center") --Button_VS_Warp_info Button_VS_bp_s = guiCreateStaticImage(381, 133, 166, 25, "images/button_standard.png", false, Window_VS) Button_VS_bp_o = guiCreateStaticImage(381, 133, 166, 25, "images/button_mouse.png", false, Window_VS) Button_VS_bp = guiCreateLabel(381, 133, 166, 25, "Localizar / Desmarcar", false, Window_VS) guiSetFont(Button_VS_bp, "default-bold-small") guiLabelSetColor(Button_VS_bp, 255, 255, 255) guiLabelSetVerticalAlign(Button_VS_bp, "center") guiLabelSetHorizontalAlign(Button_VS_bp, "center") -- guiSetFont(Button_VS_Fix_info, "default-bold-small") -- guiLabelSetColor(Button_VS_Fix_info, 255, 255, 255) -- guiLabelSetVerticalAlign(Button_VS_Fix_info, "center") -- guiLabelSetHorizontalAlign(Button_VS_Fix_info, "center") Button_VS_lk_s = guiCreateStaticImage(381, 168, 166, 25, "images/button_standard.png", false, Window_VS) Button_VS_lk_o = guiCreateStaticImage(381, 168, 166, 25, "images/button_mouse.png", false, Window_VS) Button_VS_lk = guiCreateLabel(381, 168, 166, 25, "Aberto - Fechado", false, Window_VS) guiSetFont(Button_VS_lk, "default-bold-small") guiLabelSetColor(Button_VS_lk, 255, 255, 255) guiLabelSetVerticalAlign(Button_VS_lk, "center") guiLabelSetHorizontalAlign(Button_VS_lk, "center") Button_VS_sl_s = guiCreateStaticImage(381, 203, 166, 25, "images/button_standard.png", false, Window_VS) Button_VS_sl_o = guiCreateStaticImage(381, 203, 166, 25, "images/button_mouse.png", false, Window_VS) Button_VS_sl = guiCreateLabel(381, 203, 166, 25, "Vender Veiculo", false, Window_VS) guiSetFont(Button_VS_sl, "default-bold-small") guiLabelSetColor(Button_VS_sl, 255, 255, 255) guiLabelSetVerticalAlign(Button_VS_sl, "center") guiLabelSetHorizontalAlign(Button_VS_sl, "center") Button_VS_give_s = guiCreateStaticImage(381, 238, 166, 25, "images/button_standard.png", false, Window_VS) Button_VS_give_o = guiCreateStaticImage(381, 238, 166, 25, "images/button_mouse.png", false, Window_VS) Button_VS_give = guiCreateLabel(381, 238, 166, 25, "Vender Para o Jogador", false, Window_VS) guiSetFont(Button_VS_give, "default-bold-small") guiLabelSetColor(Button_VS_give, 255, 255, 255) guiLabelSetVerticalAlign(Button_VS_give, "center") guiLabelSetHorizontalAlign(Button_VS_give, "center") adLabel = guiCreateLabel(130, 269, 296, 24, "Loja De carros", false, Window_VS) -------------- Nome do seu servidor guiSetFont(adLabel, "default-bold-small") guiLabelSetHorizontalAlign(adLabel, "center", false) guiLabelSetVerticalAlign(adLabel, "center") guiSetVisible(Button_VS_sn_o,false)-- guiSetVisible(Button_VS_dy_o,false)-- guiSetVisible(Button_VS_Warp_o,false) guiSetVisible(Button_VS_Warp_info,false) guiSetVisible(Button_VS_Fix_o,false) guiSetVisible(Button_VS_Fix_info,false) guiSetVisible(Button_VS_lk_o,false) guiSetVisible(Button_VS_sl_o,false) guiSetVisible(Button_VS_give_o,false) --Button_VS_Warp_info --Button_VS_Fix_info Window_CHK = guiCreateWindow(screX/2-155,screY/2-60,310,120,"Vender Veiculo!",false) guiSetVisible(Window_CHK, false) guiSetProperty(Window_CHK, "AlwaysOnTop", "true") guiWindowSetSizable(Window_CHK, false) Label_CHK = guiCreateLabel(21,28,266,36,"",false,Window_CHK) guiLabelSetColor(Label_CHK, 38, 122, 216) guiLabelSetHorizontalAlign(Label_CHK,"center",true) Button_CHK_Y = guiCreateButton(17,73,129,36,"Deseja Vender?",false,Window_CHK) Button_CHK_N = guiCreateButton(161,73,129,36,"Cancelar",false,Window_CHK) function updateGridList() local data = getElementData(localPlayer, "VehicleInfo") if data then local rw, cl = guiGridListGetSelectedItem(Grid_VS) guiGridListClear(Grid_VS) for i, data in ipairs (data) do local carName = customCarNames[ data['Model'] ] or getVehicleNameFromModel(data["Model"]) local ID = data["ID"] local Cost = data["Cost"] local HP = math.floor(data["HP"]) local PreCost = math.ceil(Cost*.9*HP/100/10) local row = guiGridListAddRow(Grid_VS) guiGridListSetItemText(Grid_VS, row, 1, carName, false, true) guiGridListSetItemData(Grid_VS, row, 1, ID) guiGridListSetItemText(Grid_VS, row, 2, PreCost, false, true) guiGridListSetItemText(Grid_VS, row, 3, HP.." HP", false, true) end guiGridListSetSelectedItem(Grid_VS, rw, cl) end end bindKey("F7", "down", function() if getElementInterior(localPlayer) == 0 and getElementDimension(localPlayer) == 0 then if getElementData(localPlayer, "MissionWarProtection") and getElementData(localPlayer, "MissionProtection")then return end guiSetVisible(Window_VS, not guiGetVisible(Window_VS)) guiSetVisible (Window_CHK, false) showCursor(guiGetVisible(Window_VS)) end end) triggerServerEvent("onOpenGui", localPlayer) addEventHandler("onClientElementDataChange", root, function(dd) if getElementType(source) == "player" and source == localPlayer and dd == "VehicleInfo" then local data = getElementData(source, dd) if data then updateGridList() end end end) function WINDOW_CLICK_VEHICLE (button, state, absoluteX, absoluteY) local id = guiGridListGetSelectedItem(Grid_VS) local ID = guiGridListGetItemData(Grid_VS, id, 1) if source == Button_VS_close then guiSetVisible(Window_VS, false) showCursor(false) end if (source == Grid_VS) then if id == -1 and idd then guiGridListSetSelectedItem(Grid_VS, idd, 1) return false else idd = guiGridListGetSelectedItem(Grid_VS) end elseif id == -1 then elseif (source == Button_VS_sn) then if not isInColExport () then triggerServerEvent("SpawnMyVehicle", localPlayer, ID) end elseif (source == Button_VS_dy) then triggerServerEvent("DestroyMyVehicle", localPlayer, ID) elseif (source == Button_VS_lt) then triggerServerEvent("LightsMyVehicle", localPlayer, ID) elseif (source == Button_VS_bp) then triggerServerEvent("BlipMyVehicle", localPlayer, ID) elseif (source == Button_VS_lk) then triggerServerEvent("LockMyVehicle", localPlayer, ID) elseif (source == Button_VS_sl) then guiSetVisible(Window_CHK, true) local carName = guiGridListGetItemText(Grid_VS, guiGridListGetSelectedItem(Grid_VS), 1) local carprice = guiGridListGetItemText(Grid_VS, guiGridListGetSelectedItem(Grid_VS), 2) guiSetText(Label_CHK, 'Você deseja realmente vender seu "'..carName..'" por $'..carprice) elseif source == Button_VS_give then createPlayersList(id) elseif source == Button_CHK_Y then triggerServerEvent("SellMyVehicle", localPlayer, ID) guiSetVisible(Window_VS, false) guiSetVisible(Window_CHK, false) showCursor(false) elseif source == Button_CHK_N then guiSetVisible (Window_CHK, false) elseif source == Button_VS_Spc then if getElementInterior(localPlayer) == 0 then if getElementData(localPlayer,"Stats") < 2 then SpecVehicle(ID) end end elseif source == Button_VS_Fix then triggerServerEvent("FixMyVehicle", localPlayer, ID) elseif source == Button_VS_Warp then if not isInColExport () then triggerServerEvent("WarpMyVehicle", localPlayer, ID) end elseif source == Button_PLS_Y then local row = guiGridListGetSelectedItem ( playerList_PLS ) if row and row ~= -1 then -- if guiGridListGetItemText ( playerList_PLS, row, 1 ) == getPlayerName ( localPlayer ) then -- return true -- end if (tonumber(guiGetText (edit_PLS_price)) or 0) >= 0 then outputMessage ( "#c1c1c1Esperar uma resposta do jogador.", 10, 250, 10,true ) invitations_send = true triggerServerEvent ( 'inviteToBuyCarSended', localPlayer, guiGridListGetItemText ( playerList_PLS, row, 1 ), guiGetText (edit_PLS_price) or 0, guiGridListGetItemText(Grid_VS, id, 1), guiGridListGetItemData(Grid_VS, id, 1) ) destroyElement ( Window_PLS ) end end elseif source == Button_PLS_N then destroyElement ( Window_PLS) end end addEventHandler("onClientGUIClick", resourceRoot, WINDOW_CLICK_VEHICLE)
  24. Vim deixar aqui meu servidor de Roleplay , da uma passada lá tenho certeza que vão gostar, tmj ..... ts3 : bvh.ts3top.com server : mtasa://142.44.199.198:22033
  25. local vehicleElements = {} allVeh = {510} local pickupTable = { {1086.1798095703,-1801.6898193359,13.601690292358}, } function createPickupOnServerStart () for i, cor in ipairs (pickupTable) do local pickup = createPickup(cor[1], cor[2], cor[3], 3, 1274, 0) setElementData(pickup, "pickupArenda", true) end end addEventHandler("onResourceStart", getResourceRootElement( getThisResource() ), createPickupOnServerStart) function onResourceStop (veh) if isTimer(vehicleElements[veh]) then killTimer(vehicleElements[veh]) end --vehicleElements[veh] = destroyElement(veh) end addEventHandler("onResourceStop", getResourceRootElement( getThisResource() ), onResourceStop) function onPickupHit (hit) if not getElementData(source, "pickupArenda") or getElementType(hit) ~= "player" and not isPedInVehicle(hit) then return end triggerClientEvent(hit, "changeArendaMenuState", hit) end addEventHandler("onPickupHit", getRootElement(), onPickupHit) function onPlayerUseCustomPickup() if getPlayerMoney(source) >= 500 then local x, y, z = getElementPosition(source) local veh = createVehicle(allVeh[math.random(1,#allVeh)], x, y, z) setElementData(veh, "starter_pack", true) setElementData(veh, "owner", source) warpPedIntoVehicle(source, veh) takePlayerMoney(source, 500) outputChatBox("Bicicleta alugada, bom uso!.", source, 0, 255, 0) else outputChatBox("Para alugar uma bicicleta você precisa de >> 500 $$ <<.", source, 255, 0, 0) end end addEvent("onPlayerUseCustomPickup", true) addEventHandler("onPlayerUseCustomPickup", getRootElement(), onPlayerUseCustomPickup) function onPlayerVehicleEnter (veh, seat) if getElementData(veh, "starter_pack") == true and seat == 0 then if isTimer(vehicleElements[veh]) then killTimer(vehicleElements[veh]) end end end addEventHandler("onPlayerVehicleEnter", getRootElement(), onPlayerVehicleEnter) function onPlayerVehicleExit (veh, seat) if getElementData(veh, "starter_pack") == true and seat == 0 then if isTimer(vehicleElements[veh]) then killTimer(vehicleElements[veh]) end vehicleElements[veh] = setTimer(destroyElement, 300000, 1, veh) end end addEventHandler("onPlayerVehicleExit", getRootElement(), onPlayerVehicleExit) function onVehicleStartEnter (player, seat) if getElementData(source, "starter_pack") == true and seat == 0 then local owner = getElementData(source, "owner") if owner ~= player then cancelEvent() outputChatBox("Você não é dono desta bicicleta, alugue sua bike para poder usá-la.", player, 255, 0, 0) end end end addEventHandler("onVehicleStartEnter", getRootElement(), onVehicleStartEnter) This is the script to rent bike to a player. The bike is destroyed after 5 minutes, it's ok. But i need to do something that when player is arrasted, die, logout, exit of game the bike be destroyed too. function DestroyVeiculo (veh, seat) if getElementData(veh, "starter_pack") == true and seat == 0 then if isTimer(vehicleElements[veh]) then killTimer(vehicleElements[veh]) end --vehicleElements[veh] = setTimer(destroyElement, 300000, 1, veh) vehicleElements[veh] = destroyElement(veh) end end addEventHandler ("onPlayerLogout", getRootElement(), DestroyVeiculo) addEventHandler ("onPlayerQuit", getRootElement(), DestroyVeiculo) addEventHandler ("onPlayerWasted", getRootElement(), DestroyVeiculo) addEventHandler ("onPlayerBan", getRootElement(), DestroyVeiculo) addEventHandler ("onPlayerDie", getRootElement(), DestroyVeiculo) I tried to do it the way above, but not sucess. Someone can help me ? Thanks!
×
×
  • Create New...