-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
https://wiki.multitheftauto.com/wiki/Mysql
-
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.
-
Why denny? you can cancel the event "onVehicleStartEnter", instead of removing the player from the vehicle.
-
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.
-
I suggest you to add it to "Useful functions" page at the wiki: https://wiki.multitheftauto.com/wiki/Useful_Functions
-
Skin mods: https://community.multitheftauto.com/index.php?p= ... ls&id=3801
-
Osea decis la opcion de "Play again"? si es asi, entonces no, tenes que editar el race.
-
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 )
-
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.
-
function onDeath() outputChatBox("your dead, cool story bro", source, 255, 0, 0) -- You forgot about the player element. end addEventHandler("onPlayerWasted", getRootElement(), onDeath)
-
Well, you can always re-make the DX functions and make them return elements like GUI.
-
JR10: I think he meant's that DX drawing functions doesn't return elements, like this: myText = dxDrawText()
-
You're welcome.
-
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
-
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
-
Both scripts should go in the same resource. One is client side and the other is server side.
-
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 )
-
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 )
-
Vehicle mods: https://community.multitheftauto.com/index.php?p= ... ls&id=3791 https://community.multitheftauto.com/index.php?p= ... ls&id=3792
-
Are you sure it exists? have you checked the table manually?
