Jump to content
McKay Development

ItaloAraújo

Member
  • Posts

    3
  • Joined

  • Last visited

ItaloAraújo's Achievements

  1. I've changed the code, now it isn't constantly loggin. But I still have the same problem, the paint wear shows up on the console, but I can't get the response on the server. import { csgo } from "@/server"; import { FastifyRequest, FastifyReply } from "fastify"; export async function getFloatSkinController( req: FastifyRequest, reply: FastifyReply ) { const { id } = req.params as { id: string }; const { assetid, inspectLinks } = req.body as { inspectLinks: string; assetid: string; }; if (csgo.haveGCSession) { console.log("Float"); const filteredID = inspectLinks.split("%D")[1]; return csgo.inspectItem(id, assetid, filteredID, ({ paintwear }) => { console.log(paintwear); return reply.send(paintwear); }); } }
  2. What would be the right way to do it? help
  3. I'm having some problems sending the skin's paintwear on my response. When I make a request it gets the paintwear and shows on the console, but when I try to send it through Fastify it doesn't bring anything on the data. export async function getFloatSkinController( req: FastifyRequest, reply: FastifyReply ) { const { id } = req.params as { id: string }; const { assetid, inspectLinks } = req.body as { inspectLinks: string; assetid: string; }; console.log("Começando..."); user.on("loggedOn", () => { user.gamesPlayed(730); console.log("Entrou"); csgo.on("connectedToGC", async () => { console.log("Logado!"); if (csgo.haveGCSession) { const filteredID = inspectLinks.split("%D")[1]; csgo.inspectItem(id, assetid, filteredID, ({ paintwear }) => reply.send(paintwear) ); } }); }); }
×
×
  • Create New...