Jump to content

trux_yt

Members
  • Posts

    34
  • Joined

  • Last visited

Everything posted by trux_yt

  1. local function updateNametagColor( player ) local nametagColor = { 127, 127, 127, priority = 100 } if p[ player ] and isLoggedIn( player ) then nametagColor = { 255, 255, 255, priority = 100 } if getOption( player, "staffduty" ) then for key, value in ipairs( groups ) do if isObjectInACLGroup( "user." .. p[ player ].username, aclGetGroup( value.aclGroup ) ) and value.nametagColor then --warn line if value.priority < nametagColor.priority then nametagColor = value.nametagColor nametagColor.priority = value.priority end end end elseif getOption( player, "vip" ) then nametagColor = { 224, 227, 20 } nametagColor.priority = 50 end end setPlayerNametagColor( player, unpack( nametagColor ) ) end Hi, i have this warn in the console, like a loop. Bad argument @ 'isObjectInACLGroup' [Expected acl-group at argument 2, got boolean] How i can solve this??
  2. hmmmm yea, this is correct i use this sql query in another resource and works
  3. I have this error attempt to index global sql a nil value
  4. Client-side: local level = 5 triggerServerEvent("requestGetLevelPlayer", localPlayer) --send level update request (don't use it in onClientRender) addEvent("updateLevelPlayer", true) --event to update level addEventHandler("updateLevelPlayer", root, function(playerLevel) level = playerLevel --update level end ) dxDrawText("LVL: "..level, x*2079, y*185, x*21, y*14, tocolor(255, 255, 255, 255), 1.00, font, "center", "center", false, false, false, false, false) Server-side addEvent("requestGetLevelPlayer", true) --create event on server side addEventHandler("requestGetLevelPlayer", root, function() local sql = exports.sql:query_assoc_single("SELECT nivel FROM characters WHERE characterID = "..exports.players:getCharacterID(source)) triggerClientEvent(source, "updateLevelPlayer", source, sql.nivel) --send level information to client end )
  5. Fine, but i have this error now server triggered clientside event updateLevelPlayer, but event is not added clientside
  6. This works, but, in the client side, how i can made to the level text change the level? PlayerLevel What does it perform?
  7. Hi bro, thx, but i have this error in the server code ``` attempt to index local sql a boolean value ``` in the line 5
  8. hi, how i can use the function local sql = exports.sql:query_assoc_single("SELECT nivel FROM characters WHERE characterID = "..exports.players:getCharacterID(getLocalPlayer)) in the client-side? is for a hud, for example. dxDrawText("LVL: "..tostring(sql.nivel) .."", x*2079, y*185, x*21, y*14, tocolor(255, 255, 255, 255), 1.00, font, "center", "center", false, false, false, false, false)
  9. (IN THIS FOLDER IS THE PHP FILE)
  10. i have this error in the php and i have the folder from GameQ in the directory Fatal error: Uncaught Error: Class 'GameQ\GameQ' not found in C:\xampp\htdocs\asd.php:2 Stack trace: #0 {main} thrown in C:\xampp\htdocs\asd.php on line 2
  11. Hi, I need to know some code for PHP with gameQ and get a value from online players for an MTA server, does anyone have an idea? Thanks
  12. I am looking for some resource that you can deactivate and activate any type of mods that replace models, I tried to search the community but I did not find, if anyone has or knows any like this, please give me the link pls
  13. Forget it, I'm going to delete this as I can't find any solution for it.
  14. --create spikes registerEvent("createSpike", root, function(id, data) createdSpike[id] = {} -- OID: 2892 createdSpike[id].object = createObject(data.objectId, data.posX, data.posY, data.posZ, 0, 0, data.rotZ) local x, y, z = getElementPosition( createdSpike[id].object ) -- get vehicle position local a = getElementRotation( createdSpike[id].object ) -- get player facing angle x = x + math.sin( math.rad(a) ) * 4 y = y - math.cos( math.rad(a) ) * 4 theColShapes = createColRectangle( (x - 2.0), (y - 2.0), 4.0, 4.0 ) -- set a colshape to check when a car hits the stinger setElementData( theColShapes, "amistinger", "yesplz" ) -- set the colshape as a stinger colshape if isElement(sound) then stopSound(sound) end sound = playSound3D("spike.wav", data.posX, data.posY, data.posZ + 0.1, false) print(getSoundLength(sound), getSoundLength(sound) * 1000) initAnimation("spikeAnim" .. id , false, {0, 0, 0}, {1, 0, 0}, 2450, "Linear", function(id, data) local rotated_x1, rotated_y1 = rotateAround(data.rotZ, -spikeDetails[data.objectId].width/ 2, -spikeDetails[data.objectId].length / 2) local rotated_x2, rotated_y2 = rotateAround(data.rotZ, spikeDetails[data.objectId].width / 2, -spikeDetails[data.objectId].length / 2) local rotated_x3, rotated_y3 = rotateAround(data.rotZ, spikeDetails[data.objectId].width / 2, spikeDetails[data.objectId].length / 2) local rotated_x4, rotated_y4 = rotateAround(data.rotZ, -spikeDetails[data.objectId].width / 2, spikeDetails[data.objectId].length / 2) createdSpike[id].col = createColPolygon( data.posX, data.posY, -- Center data.posX + rotated_x1, data.posY + rotated_y1, data.posX + rotated_x2, data.posY + rotated_y2, data.posX + rotated_x3, data.posY + rotated_y3, data.posX + rotated_x4, data.posY + rotated_y4 ) if isElement(sound) then stopSound(sound) end end, {id, data}) end) --wheels addEventHandler("onClientColShapeHit", root, function(vehicle, dimMatch) if vehicle and getElementType(vehicle) == "vehicle" and getElementData( source, "amistinger" ) == "yesplz" then triggerServerEvent("pierceWheel", vehicle) end end) the wheels puncture in only one corner
  15. I tried to use with what you told me but nothing, and what I mean by nothing is that no error appears in debug
  16. How can I do that if the vehicle touched the model with id 2892, execute the event? addEventHandler("onClientColShapeHit", root, function(hit,dim) if dim and getElementType(hit) == 'vehicle' then if getElementModel(hit) == 2892 then triggerServerEvent("pierceWheel", vehicle) end end end)
  17. Nothing men, nothing in the debug, i don't have changes in de db --clientside addEvent("N3xT.onShopSkin", true) local screen = {guiGetScreenSize()} local x, y = (screen[1]/1366), (screen[2]/768) local dxSkin = function() local moveY = interpolateBetween(0, 0, 0, 10, 0, 0, ((getTickCount() - tick) / 3000), "Linear") setCameraMatrix(213.5888671875, -101.4853515625-10+moveY, 1005.2578125, 216.7080078125, -101.546875, 1005.2578125 ) dxDrawRectangleBorde(x*599, y*669, x*120, y*31, tocolor(0, 0, 0, 150), false) dxDrawText(skins[current].id.." | Valor - #006400$#ffffff"..skins[current].valor, x*610, y*676, x*710, y*686, tocolor(255, 255, 255, 255), x*1, "default-bold", "left", "top", false, false, false, true, false) dxDrawText("Usa las flechas para cambiar la skin", x*500, y*646, x*815, y*662, tocolor(255, 255, 255, 255), x*1, "default", "center", "top", false, false, false, false, false) end local shop addEventHandler("N3xT.onShopSkin", root, function() if (shop ~= true) then shop = true current = 1 tick = getTickCount() base = createPed(skins[current].id, 216.7080078125, -101.546875, 1005.2578125) setElementInterior(base, 15) setElementDimension(base, 14) setElementFrozen(base, true) setPedAnimation(base, "CLOTHES", "CLO_Pose_Torso") addEventHandler("onClientRender", root, dxSkin) showCursor(true) showChat(true) playSoundFrontEnd(8) end end ) function keyShop(button) if (shop == true) then if (button == "arrow_l") then if (current > 1) then current = current - 1 setElementModel(base, skins[current].id) playSoundFrontEnd(1) end elseif (button == "arrow_r") then if (current < #skins) then current = current + 1 setElementModel(base, skins[current].id) playSoundFrontEnd(1) end elseif (button == "enter") then if (getElementModel(localPlayer) ~= skins[current].id) then if (getPlayerMoney() >= skins[current].valor) then setElementModel(localPlayer, skins[current].id) playSoundFrontEnd(12) closeShop() triggerServerEvent("textoComprado", localPlayer) else outputChatBox("No tienes $200 para comprar la skin",255,0,0) end else outputChatBox("Ya tienes esa skin",255,0,0) end elseif (button == "backspace") then closeShop() end end end bindKey("arrow_l", "down", keyShop) bindKey("arrow_r", "down", keyShop) bindKey("enter", "down", keyShop) bindKey("backspace", "down", keyShop) function closeShop() fadeCamera(false, 0.1, 0, 0, 0) removeEventHandler("onClientRender", root, dxSkin) showCursor(false) showChat(true) playSoundFrontEnd(20) destroyElement(base) setTimer(fadeCamera, 100, 1, true, 0.5) setTimer(setCameraTarget, 100, 1, localPlayer) shop = nil current = nil end function dxDrawRectangleBorde(left, top, width, height, color, postgui) if not postgui then postgui = false; end left, top = left + 2, top + 2; width, height = width - 4, height - 4; dxDrawRectangle(left - 2, top, 2, height, color, postgui); dxDrawRectangle(left + width, top, 2, height, color, postgui); dxDrawRectangle(left, top - 2, width, 2, color, postgui); dxDrawRectangle(left, top + height, width, 2, color, postgui); dxDrawRectangle(left - 1, top - 1, 1, 1, color, postgui); dxDrawRectangle(left + width, top - 1, 1, 1, color, postgui); dxDrawRectangle(left - 1, top + height, 1, 1, color, postgui); dxDrawRectangle(left + width, top + height, 1, 1, color, postgui); dxDrawRectangle(left, top, width, height, color, postgui); end -- serverside addCommandHandler("skinshombre", function(player) local sq2l = exports.sql:query_assoc_single("SELECT genero FROM characters WHERE characterID = "..exports.players:getCharacterID(player)) if sq2l.genero == 1 then triggerClientEvent("N3xT.onShopSkin", player) else outputChatBox("No eres un hombre",player,255,0,0) end end ) this is my all resource..
  18. I have this error in client side bad argument triggerServerEvent [expected acl-group at argument 2, got boolean] triggerServerEvent(localPlayer, "textoComprado", localplayer) --error and this is my server side addEventHandler("textoComprado", root, function() local model = getElementModel(source) local charID = exports.players:getCharacterID(source) if model and charID then exports.sql:query_free("UPDATE characters SET skin = '" .. model .."' WHERE characterID = '"..charID.."'") else outputDebugString("Problem with either model or charID") end end )
  19. Even if the function works in other resources correctly, you do not have to pass it. It has to be from the resource that I am programming. Can I pass the entire resource to show?
  20. I have a error with this too, i have this in the debug: Problem with either model or charID This is my client-side function to ejecute this function keyShop(button) if (shop == true) then if (button == "arrow_l") then if (current > 1) then current = current - 1 setElementModel(base, skins[current].id) playSoundFrontEnd(1) end elseif (button == "arrow_r") then if (current < #skins) then current = current + 1 setElementModel(base, skins[current].id) playSoundFrontEnd(1) end elseif (button == "enter") then if (getElementModel(localPlayer) ~= skins[current].id) then if (getPlayerMoney() >= skins[current].valor) then setElementModel(localPlayer, skins[current].id) playSoundFrontEnd(12) closeShop() triggerServerEvent("textoComprado", localPlayer) else outputChatBox("No tienes $200 para comprar la skin",255,0,0) end else outputChatBox("Ya tienes esa skin",255,0,0) end elseif (button == "backspace") then closeShop() end end end bindKey("arrow_l", "down", keyShop) bindKey("arrow_r", "down", keyShop) bindKey("enter", "down", keyShop) bindKey("backspace", "down", keyShop)
  21. I have this error: attempt to concatenate a boolean value in this part exports.sql:query_free("UPDATE personaje SET skin = '" .. model .."' WHERE characterID = "..exports.players:getCharacterID(player))
  22. I don't have any changes to the database and i don't have errores in the debug, can anyone help me?
  23. ¿Buscas un servidor argentino para rolear en un ambiente agradable y sin anti-roles? Entonces nosotros podemos brindar esos servicios de nuestro servidor de roleplay de la plataforma de Multi Theft Auto para que puedas disfrutar de esta modalidad de roleplay sin restricciones, sin toxicidad y gente nula. Somos un equipo administrativo pequeño pero seguro, también estamos en búsqueda de ser ás grande de lo que somos, nuestra comunidad es agradable y puedes divertirte con ella, creando mafias/pandillas o teniendo un rol legal trabajando en algunas de nuestras facciones. Ofrecemos sistemas libres de bugs y que proporcionan miles de posibilidades de disfrutar del juego. No importa si no conoces sobre el Roleplay, nosotros también ofrecemos una escuela de rol en nuestra comunidad ¿Nos das una chance y probar el servidor? SISTEMAS Facciones: Un sistema de facciones que te permitirá poder pertenecer y mantener a tu personaje, si te gusta la acción claro. Trabajos: ¿No lograste entrar a una facción? puedes trabajar en (Repartidor, basurero, camionero y etc) Policiales: Un sistema completo para todo aquel que sea policía. Le permite un sin fin de posibilidades y comandos/sistemas interactivos. Inventario: Un sistema de inventario y diferentes ítems (comida, bebida, cascos, llaves de coches, llaves de casas, etc). Armas: Si quieres robar a una persona o robar un negocio compra armas, ya sea de forma legal o ilegal. Graffitis: ¿Eres un pandillero rebelde y dejar tu marca? pues hazlo grafiteando lo que quieras. Muebles: Si quieres amueblar tu casa que está vacía puedes hacerlo, e interactuar con los muebles. Drogas: Este sistema de drogas es increíble, ya sea con efectos alusinógenos y cosas turbias. Negocios: ¿Quieres comprar tu propio negocio o comprar en uno? pues se puede hacer hombre. Necesidades: Este sistema puede llevar a cabo tus necesidades como las de (Sed, Hambre, Cansancio y musculatura) Paracaidismo: Puedes tirarte de paracaídas con tus amigos y disfrutar de una experiencia inimaginable. Teléfono: ¿Llamar? ¿Mandar mensajes? ¿Juegos? puedes hacerlo, también contamos con un chat de voz en él. Walkie Takie: Si compras un Walkie Takie puedes cambiar de frecuencia y charlar con tus amigos. Radio: ¿Quieres comunicarte con los miembros de tu facción? puedes hacerlo con la radio. Mascotas: ¿Te gustan los perros? puedes tener uno, darle de comida agua y mantenerlo sano. Banco: Este sistema consiste en el de en vez de tener dinero en efectivo lo puedas tener en tu cuenta bancaria. Cascos: Con este sistema puedes estar seguro de no hacerte percha mientras manejas la moto. Casino: ¿Quieres ganar más dinero, pero apostando? está nuestro casino con el black jack o tragamonedas. Autos: Puedes comprar variedad vehículos y mantenerlos seguros, pero eso sí, pagarás impuestos por ellos. Mochilas: Si tienes muchas cosas en tu inventario puedes llevar una mochila para no ocupar tanto tus bolsillos. Maleteros: Este sistema consiste en poder tener funcional el maletero de tu vehículo ya sea guardando ITEMS. Música: ¿Quieres escuchar música con tus amigos o armar una fiesta? puedes poner cualquier música con el formato MP3. Gimnasio: Con este sistema puedes subirle la musculatura a tu personaje, cambia tu aspecto físico y más fuerza en él. Puestos de reparación: Este sistema crea puestos de reparación para tus vehículos, son todos los Pay N spray de la ciudad Purga: Este sistema es para el evento de la modalidad de la purga Chat de voz: Si no te gusta escribir y boludear un rato tienes chat de voz para disfrutar mejor el rol Accesorios | Toys: Este sistema de accesorios conlleva la función de poder agregar, relojes, gorras, chalecos, etc a cualquier skin de tu PJ INFORMACIÓN IP: mtasa://mta.leeproleplay.ga:22003 TS3: ts3.leeproleplay.ga FORO: https://foro.leeproleplay.ga/foro WEB: https://www.leeproleplay.ga/ DISCORD: https://www.leeproleplay.ga/discord | https://discord.gg/RwWFh3m
  24. Buenas me gustaría saber si hay un "/cd" implementado en el servidor para poner música, aquí una imagen de lo que me refiero. https://imgur.com/a/7zE3qpF
×
×
  • Create New...