Jump to content

DNL291

Retired Staff
  • Posts

    3,875
  • Joined

  • Days Won

    67

Everything posted by DNL291

  1. Quer dizer isto: https://forum.multitheftauto.com/viewtopic.php?f ... it=package ?
  2. Because getValidPedModels returns a table not a number.
  3. Where is thePlayer defined?
  4. Tente isto: local allowKitarmas = {} local tempo = 120000 function kitarmas ( source ) if (allowKitarmas[source] == false) then return end local accountname = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup("user." .. accountname, aclGetGroup("VIP")) then giveWeapon(source, 24, 50, true) giveWeapon(source, 27, 50, true) giveWeapon(source, 30, 30, true) giveWeapon(source, 31, 30, true) giveWeapon(source, 34, 5, true) outputChatBox("#00ff00[KitVIP]: Você pegou o Kit VIP", source, 255, 255, 255, true) outputChatBox("#00f5ff[KitVIP]:#ffffff O jogador #00ff00 "..getPlayerName(source).." #ffffff Acaba de pegar o KITVIP , Seja você tambem VIP por Apenas 10 Reais Mensais", root, 255, 255, 255, true) allowKitarmas[source] = false setTimer( function() allowKitarmas[source] = true end, tempo, 1 ) end end addCommandHandler("kitvip", kitarmas) addEventHandler("onPlayerQuit", root function() if allowKitarmas[source] then allowKitarmas[source] = nil end end) O tempo para o jogador usar esse comando está definido na variável tempo (é em milisegundos).
  5. Server: function createSAPDTeam () SAPDteam = createTeam ("Caminhoneiro", 100, 149, 237) end addEventHandler ("onResourceStart", resourceRoot, createSAPDTeam) function joinSAPD() setPlayerTeam ( source, SAPDteam ) end addEvent("getJob", true) addEventHandler("getJob",root,joinSAPD) Client: function setSkin ( ) guiSetVisible (GUIEditor.staticimage[1], false) showCursor (false) triggerServerEvent("getJob", localPlayer) end
  6. Any erros in debugscript? (Login_System is the resource name or a folder?)
  7. manawydan não quis dizer que tem muitos tipos de compiladores para Lua. O que ele quis dizer com "compiladores" é que tem diversos programas que compila um código através de uma interface, mas é claro que todos eles usam o mesmo modo para compilar o script (não é fácil assim de escrever o seu próprio compilador ).
  8. Which team you want the player doesn't come in? The team that was saved with setAccountData?
  9. Pode postar um link com a imagem do console quando você tenta carregar este recurso com o comando refresh? E também, uma imagem do recurso mostrando o arquivo meta.xml, as texturas e o script.
  10. What do you mean? You want to get all items of the table or what?
  11. outputChatBox(tab[1][1]) --> nme outputChatBox(tab[1][2]) --> text outputChatBox(tab[3][2]) --> text3
  12. isPedInVehicle getPedOccupiedVehicle setElementPosition addCommandHandler
  13. De nada. A questão do timed out já é um problema da conexão do jogador com o servidor.
  14. A tag serverip no arquivo mtaserver está com algum IP? Se estiver, remova ele e deixa sem nada, e veja se o problema foi corrigido.
  15. Vehicle/skin mod: https://community.multitheftauto.com/ind ... ls&id=7756 https://community.multitheftauto.com/ind ... ls&id=7757 EDIT: It's script too.
  16. I don't know exactly what was causing that problem, I just edited it to fix some things. What's wrong with using killTimer? If you want to start the timer again just use setTimer.
  17. Try this: local theSerial = "0396C6F543425FFE37A326883D73B4F4" local vehicleTimer = {} addCommandHandler("colors", function(thePlayer, command) if ( getPlayerSerial ( thePlayer ) == theSerial ) then local v = getPedOccupiedVehicle ( thePlayer ); if ( v ) then if ( isTimer ( vehicleTimer[thePlayer] ) ) then killTimer ( vehicleTimer[thePlayer] ); return; end vehicleTimer[thePlayer] = setTimer ( randomVehColors, 2000, 0, thePlayer ); end end end ); addEventHandler( "onVehicleStartExit", root, function ( thePlayer ) if ( isTimer ( vehicleTimer[thePlayer] ) ) then killTimer ( vehicleTimer[thePlayer] ); end end ); local color = {} function randomVehColors ( thePlayer ) local car = getPedOccupiedVehicle( thePlayer ) if not ( car ) then if ( isTimer ( vehicleTimer[thePlayer] ) ) then killTimer ( vehicleTimer[thePlayer] ); end return; end if ( isVehicleDamageProof( car ) == true ) then color[1] = math.random(0,126) ; color[2] = math.random(0,126); color[3] = math.random(0,126); color[4] = math.random(0,126) ; setVehicleColor ( car, color[1], color[2], color[3], color[4] ) end end
  18. outputChatBox(getPlayerName(source).. "'s vehicle has been blown for being AFK ["..afkCount.."/3]",getRootElement(),255,0,0)
  19. getElementID returns string not a number.
  20. thePlayer isn't defined at getPedOccupiedVehicle function (line 4) and vehicle isn't defined at line 16.
  21. I really don't understand what you mean. What do you mean by "same element"?
  22. Replace: destroyElement(vehicle) With: removePedFromVehicle(thePlayer)
  23. Try this: function createMyVehicle(vehicleid,x,y,z,thePlayer) if vehicleid and x and y and z then local vehicle = getPedOccupiedVehicle(thePlayer) if (vehicle) then destroyElement(vehicle) end local Vehicle = createVehicle(vehicleid,x,y,z) if thePlayer and Vehicle then warpPedIntoVehicle ( thePlayer, Vehicle ) end end end addEvent("createVehicleFromGUI",true) addEventHandler("createVehicleFromGUI",root,createMyVehicle)
  24. Show how you created the grid list and how you used the guiGridListSetItemText function.
  25. See if 'selected' will return the vehicle ID on the chatbox. function createVehicleHandler(button,state) if button == "left" and state == "up" then local row,col = guiGridListGetSelectedItem(PCSgridlist) if row and col and row ~= -1 and col ~= -1 then local selected = tonumber(guiGridListGetItemText(PCSgridlist, row, col)) outputChatBox(selected) local rotz = getPedRotation(getLocalPlayer()) local x,y,z = getElementPosition(getLocalPlayer()) x = x y = y if selected and x and y and z then triggerServerEvent("createVehicleFromGUI",localPlayer,selected,x,y,z) guiSetVisible(windowPCS,false) showCursor(false,false) else outputChatBox("Invalid arguments.") end else outputChatBox("Please select a vehicle.") end end end
×
×
  • Create New...