-
Posts
1,056 -
Joined
-
Last visited
Everything posted by Sasu
-
Try with getColorFromString
-
Is there any function to get download size ?
-
I dont know if it works. Maybe yes. addEventHandler("onPlayerCommand", root, function(cmd) if cmd == "reconnect" then cancelEvent() end end)
-
Puedes usar onClientPlayerWeaponFire y si quieres puedes usar triggerServerEvent para hacer algo en el server side.
-
I hope that this will be helpful in the future. Thank you.
-
Oh, I didnt know that. So, I have to use 'pairs' ?
-
I think you didnt understand or I am wrong. I want to check in all the colshapes.
-
I made this function to check if the player is in some colshape in table. function isPlayerWithInZone(source) if source and getElementType(source) == "player" then outputChatBox("TEST1", root) for i,v in ipairs(SXDueloE) do outputChatBox(getElementType(v[1])..", "..getElementType(v[2]), root) if isElementWithinColShape(source, v[2]) then theReturn = true break end end else theReturn = false end return theReturn end And Here when It create the colshape addEventHandler("onResourceStart", resourceRoot, function() for i,v in ipairs(markerPos) do local x,y,z = unpack(v) local marker = createMarker(x, y, z, "cylinder", 2, 255, 0, 0, 100) createBlipAttachedTo(marker, 56) local col = createColSphere(x, y, z, 10) SXDueloE[marker] = {marker, col} end end) My question is why my function return nil?
-
Hola a todos. Estoy en busca de una provedor de web hosting pago que tenga banda ancha ilimitada, incluya dominio gratis, mysql y ,en lo posible, barato. Me recomiendan alguno?
-
You're welcome
-
Try with triggerEvent
-
If you are in the same resource, you can use as normal function. yourFunctionName()
-
I want delete my resource: https://community.multitheftauto.com/index.php?p= ... ls&id=6688 DONE
-
Usa el recurso 'slothbot' de slothman https://community.multitheftauto.com/index.php?p= ... ils&id=672 Fijate sus funciones. Eso te ayudara.
-
Works, Thank you very much.
-
Server: function getPlayerKillsInOrder() theTable = {} for i, acc in ipairs(getAccounts()) do local name = getAccountName(acc) local kills = getAccountData(acc, "kills") or 0 table.insert(theTable, {kills, name}) end table.sort(theTable) return theTable end addEvent("refreshList", true) addEventHandler("refreshList", root, function() triggerClientEvent(source, "onRequestRefresh", source, getPlayerKillsInOrder()) theTable = nil end) Client: addEvent("onRequestRefresh", true) addEventHandler("onRequestRefresh", root, function(theTable) guiGridListClear(GUIEditor.gridlist[1]) for i, v in ipairs(theTable) do local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], row, 1, tostring(i), false, false) guiGridListSetItemText(GUIEditor.gridlist[1], row, 2, tostring(v[2]), false, false) guiGridListSetItemText(GUIEditor.gridlist[1], row, 3, tostring(v[1]), false, false) end end) Why the debugscript says: ERROR: attempt to compare two table values ?
-
Si tu quieres que el auto se destruya cuando el conductor salga, que en este caso seria el administrador que lo aparecio, se destruya. local adminVehicle = {} function infernus(thePlayer, cmdName) local x, y, z = getElementPosition(thePlayer) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) then if (isPedInVehicle(thePlayer)) then outputChatBox("Sal de tu auto actual ( "..getVehicleName(getPedOccupiedVehicle(thePlayer)).." )", thePlayer, 0, 250, 0) else adminVehicle[thePlayer] = createVehicle(411, x+2, y+2, z)--- ID del auto if adminVehicle[thePlayer] then outputChatBox("Creaste el auto", thePlayer, 0, 250, 0) warpPedIntoVehicle(thePlayer, adminVehicle[thePlayer]) else outputChatBox("Ha ocurrido un error al crear el vehiculo. Revisa bien los argumentos", thePlayer, 255, 0, 0) end end else outputChatBox("Tu no eres del grupo ACL 'Admin' por lo tanto no puedes usar este comando. ( /"..cmdName.." )", thePlayer, 255, 0, 0) end end addCommandHandler("auto", infernus) function destroyAdminVehicle(thePlayer, seat) if adminVehicle[thePlayer] and source == adminVehicle[thePlayer] and seat == 0 then outputChatBox("Tu vehiculo '"..getVehicleName(source).."' ha sido destruido", thePlayer, 0, 255, 0) destroyElement(source) adminVehicle[thePlayer] = nil end end addEventHandler("onVehicleExit", root, destroyAdminVehicle)
-
triggerServerEvent -- Ejecutar una funcion server logIn -- Loguear a un jugador addAccount -- Registrar una cuenta
-
What updates do you want in my turf system? ( https://community.multitheftauto.com/index.php?p= ... ls&id=6772 )
-
You can make a command in client side with engineReplaceModel if you mean what I think.
-
El primer parametro de addCommandHandler devuelve el jugador quien lo ejecuta, en server side. Deberas usar getPedOccupiedVehicle para obtener el vehiculo del jugador.
-
Usa getElementPosition para obtener las coordenadas de un jugador.
