Jump to content

Chainsaw

Members
  • Content Count

    21
  • Joined

  • Last visited

Community Reputation

6 Neutral

About Chainsaw

  • Rank
    Civilian

Details

  • Gang
    Grove Street
  • Location
    Los Santos
  • Occupation
    distribute crack
  • Interests
    Music, blah blah

Recent Profile Visitors

1,246 profile views
  1. Cuando se compraban items online qué pasaba si al mismo tiempo estabas conectado en el servidor mirando el inventario? tengo ciertas dudas sobre eso acá en mta porque no he visto nada referente a sockets.
  2. Hola pequeña

    1. _Cipriano

      _Cipriano

      Yo se hasta cuando cagas papa

  3. really you did DDoS attacks? In SA: MP can do that freely, I'm really happy which MTA Team ban people for this
  4. with "?" you mean for ternaries? you could "simulate" operators
  5. Sorry, I still do not get used to the aesthetics of language change DestroyElement to destroyElement and change getElementID for getVehicleName (this vehicles not have id default)
  6. addEventHandler("onVehicleExplode", getRootElement(), function () if(not vehicleIsStatic(source)) then -- Not is vehicle from map outputChatBox("The vehicle ID: " .. getElementID(source) .. " was destroyed"); DestroyElement(source) end end)
  7. well, i did a test code: addCommandHandler("v", function(player, command) local v = getPedOccupiedVehicle(player); if (v) then local n = (not vehicleIsStatic(v)) and ("player") or ("map"); outputChatBox("This vehicle is from " .. n) else outputChatBox("you are't in a vehicle") end end) function vehicleIsStatic(element) if(getElementType(element) == "vehicle") then local tag = getElementID(element); if(tag and (string.find(tag, "server_"))) then return 1; end end end And yes, server-side! do not forget which this works with tag
  8. addCommandHandler("test", function(player, command) local v = getPedOccupiedVehicle(player); if (v) then outputChatBox("This vehicle is from " .. (vehicleIsStatic(v)) and "map" or "player", player) end end) function vehicleIsStatic(element) if(getElementType(element) == "vehicle") then local tag = getElementID(element); if(tag and (string.find(tag, "server_"))) then return 1; end end end
  9. In your .map vehicles you have something like: <vehicle id="vehicle (Buffalo) (3)" paintjob="3" interior="0" alpha="160" model="405" plate="INT6 8C7" dimension="0" posX="1802.0996" posY="-1932.990" posZ="13.2" rotX="0" rotY="0" rotZ="0" color="45,58,53,159,157,148,0,0,0,0,0,0"></vehicle> Change to <vehicle id="server_vehicle (Buffalo) (3)" paintjob="3" interior="0" alpha="160" model="405" plate="INT6 8C7" dimension="0" posX="1802.0996" posY="-1932.990" posZ="13.2" rotX="0" rotY="0" rotZ="0" color="45,58,53,159,157,148,0,0,0,0,0,0"></vehicle> and in the scr
  10. I imagine you can do this by setting variables when creating a vehicle, another way I can think of is to assign a tag following the ID in a specific way to the map vehicles and then get the string from getElementID Example: id="Uranus 5" to id="server_Uranus 5" and check if the vehicle belongs to map with string.find
  11. I doubt that it is hate. This is the line of everything, I know that there are people who still want to give life to XP but that is very subjective .. If we talk about objectivity XP takes the same course as everything you need to get rid of your old structures, really is very hard for you go to Win 7?
  12. Actualice el recurso, la función dateToUnix tenía un bug en la conversión de tiempo ______________________ Por cierto, lo que está en la imagen de presentación del tema se puede lograr así: local time = getRealTime(); local day, month, year = time.monthday, time.month + 1, time.year + 1900; for i=1,getRemaningDaysInYear(day, month, year) do local d, m, y = getDateInAdd(day, month, year, i, 0, 0) outputServerLog(string.format("In +%i days will be: %s %i, %i (%s)", i, getMonthName(m), d, y, getWeekDay(d, m, y))) end Dicho script te dirá qué d
  13. Introducción Este recurso es una ayuda a los programadores que busquen tener un control más amplio del tiempo! Funciones: getWeekDay getMonthDays getMonthName getYearDays getRemaningDaysInYear getSpentsDaysInYear dateToUnix unixToDate getDateInAdd Ejemplos string getWeekDay(day, month, year) Permite obtener qué día de la semana es la fecha específicada (Su funcionamiento es puramente matemático, para conocer más sobre su funcionamiento https://en.wikipedia.org/wiki/Zeller's_congruence) outputchatBox(ge
  14. Chainsaw

    speaker

    Where do you want to spawn the object?
  15. Hello, i am new in this world.. But i believe i can help you: Well, so i'll try explain some things.. as you do know MTA is client-server, so your need to make this system use both sides, why? playSound3D is a function a client side and your need access to that from the server side.. Example, this is a command in server side: addCommandHandler("play", function(player, cmd, ...) if(getElementData(player, "players:admin") == true) then if(getElementData(player, "playing") == true) then triggerClientEvent(root, "client:stopSound", root); setElementData(player, "playing", f
×
×
  • Create New...