Jump to content

Harvey

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Harvey

  1. function setPlayerSkin2(thePlayer, commandName, targetPlayer, skin) if (tonumber(getElementData(thePlayer, "acc:admin") or 0) >= 1) then if not (targetPlayer) or not (skin) then outputChatBox("#7cc576Használat:#ffffff /" .. commandName .. " [Név / ID] [Skin ID]", thePlayer, 255, 255, 255, true) else local targetPlayer, targetPlayerName = exports.san_core:findPlayer(thePlayer, targetPlayer) local skin = tonumber(skin) if not (targetPlayer) then outputChatBox(error .. "Nincs ilyen játékos.", thePlayer, 255, 255, 255, true) return end if getElementModel(targetPlayer) == skin then outputChatBox(error .. "A játékoson már ez a skin van.", thePlayer, 255, 255, 255, true) return end if setElementModel(targetPlayer, skin) then outputChatBox("Sikeresen megváltoztattad #7cc576" .. targetPlayerName:gsub("_"," ") .. "#ffffff skinjét. #7cc576(" .. skin .. ")", thePlayer, 255, 255, 255, true) dbExec(con, "UPDATE characters SET skin = ? WHERE ID = ?",skin,getElementData(targetPlayer, "acc:id")) else outputChatBox(error .. "Nem sikerült megváltoztatni #7cc576" .. targetPlayerName:gsub("_"," ") .. "#ffffff skinjét. Hibakód: SSKIN1", thePlayer, 255, 255, 255, true) end end end end addCommandHandler("setskin", setPlayerSkin2, false, false) So I have this command made but its not working. I checked everything most of the commands are working fine but this one just refuse to do anything. (It doesnt give any error code in the console)
×
×
  • Create New...