Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. That doesn't make any sense. You can use this function to conver the R, G, B color to HEX: https://wiki.multitheftauto.com/wiki/RGBToHex NOTE: REMEMBER TO COPY THE FUNCTION SOURCE CODE, IS NOT A NATIVE MTA FUNCTION.
  2. Are you sure that you replaced the whole function? it should work.
  3. function giveMeVehicles(vehicles) if type(vehicles) == 'number' then vehicles = { vehicles } end local px, py, pz, prot local radius = 3 local playerVehicle = getPedOccupiedVehicle(source) if playerVehicle and isElement(playerVehicle) then px, py, pz = getElementPosition(playerVehicle) prot, prot, prot = getVehicleRotation(playerVehicle) else px, py, pz = getElementPosition(source) prot = getPedRotation(source) end local offsetRot = math.rad(prot) local vx = px + radius * math.cos(offsetRot) local vy = py + radius * math.sin(offsetRot) local vz = pz + 2 local vrot = prot local vehicleList = g_PlayerData[source].vehicles local vehicle if ( not vehicles ) then return end for i,vehID in ipairs(vehicles) do if vehID < 400 or vehID > 611 then errMsg(vehID ..' is incorrect vehicle model', source) elseif not table.find(getOption('vehicles.disallowed'), vehID) then if #vehicleList >= getOption('vehicles.maxperplayer') then unloadVehicle(vehicleList[1]) end vehicle = createVehicle(vehID, vx, vy, vz, 0, 0, vrot) if (not isElement(vehicle)) then return end setElementInterior(vehicle, getElementInterior(source)) setElementDimension(vehicle, getElementDimension(source)) table.insert(vehicleList, vehicle) g_VehicleData[vehicle] = { creator = source, timers = {} } warpPedIntoVehicle(source, vehicle) if not g_Trailers[vehID] then if getOption('vehicles.idleexplode') then g_VehicleData[vehicle].timers.fire = setTimer(commitArsonOnVehicle, getOption('vehicles.maxidletime'), 1, vehicle) end g_VehicleData[vehicle].timers.destroy = setTimer(unloadVehicle, getOption('vehicles.maxidletime') + (getOption('vehicles.idleexplode') and 10000 or 0), 1, vehicle) end vx = vx + 4 vz = vz + 4 else errMsg(getVehicleNameFromModel(vehID):gsub('y$', 'ie') .. 's are not allowed', source) end end end
  4. Go to "freeroam/fr_server.lua" and copy the whole "giveMeVehicles" function, then post it here.
  5. You can load the .map file with the XML functions and create everything with createObject.
  6. I don't think that is possible.
  7. I don't understand what do you mean.
  8. You have a guest button on your login panel?
  9. Castillo

    ScrollBar

    Well, I guess you could somehow override it.
  10. You must edit the freeroam script, it's not hard to do it.
  11. You forgot the quotes at triggerEvent.
  12. It's dxDrawText actually.
  13. Go to http://portforward.com/ it has tutorials for a lot of modems/routers as far as I know.
  14. Castillo

    String a *****

    Si que funciona, envia un mensaje a la consola del servidor, igual, era solo un ejemplo.
  15. Castillo

    String a *****

    str = "Hola" str = str:rep ( "*", str:len ( ) ) print ( str )
  16. Castillo

    .

    Cual es la version de tu servidor? tiene que ser 1.3.4 o no servira.
  17. Creas una label sin texto, que actuara como 'boton'.
  18. Try removing this line: setTimer (giveWeapon, 2000, 1, source, theWeapon, weaponAmmo, true)
  19. There's no need for 'thePlayer' in the client side, as getCameraMatrix has no arguments when used client side, nor command handler has a player element on the client side.
  20. Because you are giving the player the weapon he's currently holding after 2 seconds of dying, and you're also giving the weapons he used to have when died on spawn.
  21. If you want it to connect to the MySQL server when the resource starts, then you can use onResourceStart. function mysqlconnect ( ) handler = mysql_connect ( "localhost", "root", "", "crpmta" ) -- Establish the connection if ( not handler ) then -- The connection failed outputDebugString ( "Unable to connect to the MySQL server" ) else mysql_close ( handler ) -- Close the connection end end addEventHandler ( "onResourceStart", resourceRoot, mysqlconnect )
  22. If he wants to make that vehicle restricted to the 'MI-6' team only, then he should change 'root' to 'vehicle' at addEventHandler.
  23. addCommandHandler ( "get", function ( thePlayer ) outputChatBox ( table.concat ( { getCameraMatrix ( thePlayer ) }, ", " ), thePlayer ) end )
×
×
  • Create New...