Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. https://wiki.multitheftauto.com/wiki/Mysql
  2. GUI labels doesn't allow HEX colors. You'll have to find the function: guiCreateColorLabel or something similar around the forums and implement it in the script.
  3. Why denny? you can cancel the event "onVehicleStartEnter", instead of removing the player from the vehicle.
  4. The code is too long to use the Lua tags, it'll just appear as blank. @Fun: Post your script on http://www.pastebin.com/ and post the link here instead of your script.
  5. Castillo

    team set

    addEventHandler("onPlayerJoin",root, function () if (getPlayerName(source) == "TroyBoy") then local ownerTeam = getTeamFromName("OwnerTeam") if (ownerTeam) then setPlayerTeam(source, ownerTeam) end end end )
  6. I suggest you to add it to "Useful functions" page at the wiki: https://wiki.multitheftauto.com/wiki/Useful_Functions
  7. Skin mods: https://community.multitheftauto.com/index.php?p= ... ls&id=3801
  8. Castillo

    Redo

    Osea decis la opcion de "Play again"? si es asi, entonces no, tenes que editar el race.
  9. MsgBoxWindow = {} MsgBoxText = {} MsgBoxWindow = guiCreateWindow(0.3984,0.3841,0.2061,0.1901,"Info",true) guiSetAlpha(MsgBoxWindow, 0.80) MsgBoxText = guiCreateLabel(0.1991,0.2808,0.5498,0.4726,"",true,MsgBoxWindow) guiSetVisible(MsgBoxWindow, false) showCursor(false) function newmsgbox(co) guiSetVisible(MsgBoxWindow, true) guiSetText(MsgBoxText, tostring(co)) showCursor(false) setTimer(function() guiSetAlpha(MsgBoxWindow,0.70000000000000) end, 300, 1) setTimer(function() guiSetAlpha(MsgBoxWindow,0.60000000000000) end, 700, 1) setTimer(function() guiSetAlpha(MsgBoxWindow,0.50000000000000) end, 1000, 1) setTimer(function() guiSetAlpha(MsgBoxWindow,0.40000000000000) end, 1300, 1) setTimer(function() guiSetAlpha(MsgBoxWindow,0.30000000000000) end, 1500, 1) setTimer(function() guiSetAlpha(MsgBoxWindow,0.20000000000000) end, 1800, 1) setTimer(function() guiSetAlpha(MsgBoxWindow,0.10000000000000) end, 2000, 1) setTimer(function() guiSetAlpha(MsgBoxWindow,0.00000000000000) end, 2300, 1) setTimer(function() guiSetVisible(MsgBoxWindow, false) end, 2300, 1) end addEvent("msgBoxInfo", true) addEventHandler("msgBoxInfo", getRootElement(), newmsgbox) addEventHandler("onClientPlayerWasted",localPlayer, function () triggerEvent("msgBoxInfo", localPlayer, "my text") end )
  10. Talvez usen este recurso: https://community.multitheftauto.com/index.php?p= ... ls&id=1873 No usa esa funcion que yo sepa, pero es una cuerda de SWAT. P.D: Si descargas los ultimos recursos podes encontrar un recurso llamado "fastrope", que yo sepa es un recurso que ayuda a crear lo que queres.
  11. function onDeath() outputChatBox("your dead, cool story bro", source, 255, 0, 0) -- You forgot about the player element. end addEventHandler("onPlayerWasted", getRootElement(), onDeath)
  12. Castillo

    DirectX Anim

    Well, you can always re-make the DX functions and make them return elements like GUI.
  13. Castillo

    DirectX Anim

    JR10: I think he meant's that DX drawing functions doesn't return elements, like this: myText = dxDrawText()
  14. local carlist = {} function updateCarsList () local meta = xmlLoadFile("carshop/settings.xml") for index, car in ipairs(xmlNodeGetChildren(meta)) do local id = xmlNodeGetAttribute(car, "id") local name = xmlNodeGetAttribute(car, "name") local price = xmlNodeGetAttribute(car, "price") carlist[tonumber(id)] = {name, price} outputDebugString(tostring(carlist[id][1]) ..": ".. tostring(carlist[id][2])) end xmlUnloadFile(meta) end
  15. local carlist = {} function updateCarsList () local meta = xmlLoadFile("carshop/settings.xml") for index, car in ipairs(xmlNodeGetChildren(meta)) do local id = xmlNodeGetAttribute(car, "id") local name = xmlNodeGetAttribute(car, "name") local price = xmlNodeGetAttribute(car, "price") carlist[tonumber(id)] = name outputDebugString(tostring(carlist[411])) end xmlUnloadFile(meta) end
  16. Both scripts should go in the same resource. One is client side and the other is server side.
  17. local playerBlips = {} addEventHandler("onPlayerSpawn", getRootElement(), function () local account = getPlayerAccount(source) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if isObjectInACLGroup("user." .. accountName, aclGetGroup("Admin")) then if isElement(playerBlips[source]) then destroyElement(playerBlips[source]) end playerBlips[source] = createBlipAttachedTo(source, 0, 2, 0, 0, 0, 255, 0, 99999.0, 0) end end ) addEventHandler("onPlayerQuit", getRootElement(), function() if isElement(playerBlips[source]) then destroyElement(playerBlips[source]) end playerBlips[source] = nil end ) addEventHandler("onPlayerWasted", getRootElement(), function() if isElement(playerBlips[source]) then destroyElement(playerBlips[source]) end playerBlips[source] = nil end )
  18. Tambien podrias usar una tabla y hacerlo mucho mas facil. local mensajes = { "#FFFFFF Nuevo en el Server? #00FFFF Lee las /Reglas", "#FFFFFF Abuser o Chater? #00FFFF Usa /Report", "#FFFFFF Visita el Foro! #00FFFF GTAChile.com", "#FFFFFF Admins Online? #00FFFF Usa /Admins", } setTimer ( function () local numeroAlAzar = math.random ( #mensajes ) -- Al azar, elige los mensajes de la tabla. local mensaje = mensajes[numeroAlAzar] -- Sacamos el mensaje de la tabla con el numero. outputChatBox ( mensaje, getRootElement(), 255, 0, 0, true ) end ,30000, 0 )
  19. Vehicle mods: https://community.multitheftauto.com/index.php?p= ... ls&id=3791 https://community.multitheftauto.com/index.php?p= ... ls&id=3792
  20. Are you sure it exists? have you checked the table manually?
×
×
  • Create New...