Search the Community
Showing results for tags 'scripter'.
-
Eu jogava em uma cidade muito boa, porém por uns motivos ai ela nunca mais foi a mesma. Há um tempinho eu e meu amigo começamos a tentar criar uma cidade nova. Então que me deparo com o mesmo inventario daquela cidade, tem rota, montagem arma, bau, conce, detran etc sóq nao tem 3 coisas basicas pro rp, revistar/saquear, radinho, sistema dinheiro sujo. Se alguem pirar de me ajudar mano fico mt agradecido de vdd, caso alguem queira o inventario tbm eu libero pra vcs Meu dc qlr coisa; brbugadao
-
se busca scripters para este servidor que sepa programar en lua de forma voluntaria si quiere puede unirse al proyecto estamos con la gamemode de chicago roleplay / pop life / life stealh roleplay son de la misma base las 3 se maneja algo similar por lo que tengo entendido el que este interesado entre al servidor de discord, verifiquense y abran un ticket para hablarme de forma privada adamas buscamos nuevos usuarios que sean activos para poder poner en pie el servidor, gracias. Discord: https://discord.gg/Ecjn6AyUQN
-
- scripter
- araboth roleplay
-
(and 7 more)
Tagged with:
-
se busca scripters para este servidor que sepa programar en lua de forma voluntaria si quiere puede unirse al proyecto estamos con la gamemode de chicago roleplay / pop life / life stealh roleplay son de la misma base las 3 se maneja algo similar por lo que tengo entendido el que este interesado entre al servidor de discord, verifiquense y abran un ticket para hablarme de forma privada adamas buscamos nuevos usuarios que sean activos para poder poner en pie el servidor, gracias. Discord: https://discord.gg/Ecjn6AyUQN
-
- scripter
- desarollador
-
(and 5 more)
Tagged with:
-
Então Eu passei a madrugada toda tentando resolver um script aq onde que consiste em é um sistema de Garagem e concessionária... Porém eu adcionei um sistema de Detran em meu servidor e estava tentando modificar uma coisa nesse sistema ai de garagem que é... No painel tem " pegar veiculo ", Porém quando pega o veiculo ele spawna em você ( apos deslogar ou se o carro estiver destruido ) porém eu queria alterar isso para " spawnar veiculo " para Spawnar onde o carro foi deixado e colocar um teleport detran em meio a isso... ( caso algum player jogue o carro na água, etc... ) Tirando a função de "trancar/destrancar" alterando para " teleport Pátio " Porém mano, eu tentei a madrugada toda e está muito além de mim o script -------------------------------------------------------------------------------------------------------------------------------------------------------------------- function getFreeID() local result = dbPoll(dbQuery(db, "SELECT ID FROM VehicleList ORDER BY ID ASC"), -1) newID = false for i, id in pairs (result) do if id["ID"] ~= i then newID = i break end end if newID then return newID else return #result + 1 end end function getFreePlate(vehicle, NewID, source) local str = "ABCDEFGHIJKLMNPQRSTUVXWYZ" local plate = "" for index = 1, 3 do plate = plate .. string.char(str:byte(math.random(1, #str))) end plate = string.upper(plate) plate = plate .. "" for index = 1, 1 do plate = plate .. math.random(1, 9) end for index = 1, 1 do plate = plate .. string.char(str:byte(math.random(1, #str))) end for index = 1, 2 do plate = plate .. math.random(1, 9) end setVehiclePlateText(vehicle, plate) setElementData(vehicle,"Placa",plate) dbExec(db, "UPDATE VehicleList SET Placa=? WHERE Account=? AND ID=?", plate, getAccountName(getPlayerAccount(source)),tonumber(NewID)) end function getVehicleByID(id) v = false for i, veh in ipairs (getElementsByType("vehicle")) do if getElementData(veh, "ID") == id then v = veh break end end return v end function updateVehicleInfo(player) if isElement(player) then local result = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ?", getAccountName(getPlayerAccount(player))), -1) if type(result) == "table" then setElementData(player, "VehicleInfo", result) end end end local marcacao = {} local blip = {53} addEventHandler("onResourceStart", resourceRoot, function() if getThisResource() == resource then db = dbConnect("sqlite", "database.db") dbExec(db, "CREATE TABLE IF NOT EXISTS VehicleList (ID, Placa, Account, Model, X, Y, Z, RotZ, Colors, Upgrades, Paintjob, DETRAN, Cost, HP, new_hydr)") for i, player in ipairs(getElementsByType("player")) do updateVehicleInfo(player) end for _,marker in ipairs(pontosDeGaragem) do marcacao[marker] = createMarker(marker[1], marker[2], marker[3]-1, "cylinder", configPontos.tamanhoMarker, configPontos.corMarker[1], configPontos.corMarker[2], configPontos.corMarker[3], 170) setElementDimension(marcacao[marker], marker[5]) setElementInterior(marcacao[marker], marker[4]) blip[marker] = createBlipAttachedTo(marcacao[marker], configPontos.idBlip) setBlipSize(blip[marker], 5) end end end) addEventHandler("onMarkerHit", getRootElement(), function(executor) if executor and isElement(executor) and getElementType(executor) == "player" then for _,marker in ipairs(pontosDeGaragem) do if marcacao[marker] == source then if not isGuestAccount(getPlayerAccount(executor)) then triggerClientEvent(executor, "abrirPainelIndConce", executor) break end end end end end) addEventHandler("onMarkerLeave", getRootElement(), function(executor) if executor and isElement(executor) and getElementType(executor) == "player" then for _,marker in ipairs(pontosDeGaragem) do if marcacao[marker] == source then if not isGuestAccount(getPlayerAccount(executor)) then triggerClientEvent(executor, "fecharPainelIndConce", executor) break end end end end end) addEvent("onOpenGui", true) addEventHandler("onOpenGui", root, function() updateVehicleInfo(source) end) function destroyVehicle(theVehicle) if isElement(theVehicle) then local Owner = getElementData(theVehicle, "Owner") if Owner then local x, y, z = getElementPosition(theVehicle) local _, _, rz = getElementRotation(theVehicle) local r1, g1, b1, r2, g2, b2 = getVehicleColor(theVehicle, true) local color = r1..","..g1..","..b1..","..r2..","..g2..","..b2 upgrade = "" for _, upgradee in ipairs (getVehicleUpgrades(theVehicle)) do if upgrade == "" then upgrade = upgradee else upgrade = upgrade..","..upgradee end end local Paintjob = getVehiclePaintjob(theVehicle) or 3 local id = getElementData(theVehicle, "ID") local DETRAN = getElementData(theVehicle, "Travado") dbExec(db, "UPDATE VehicleList SET X = ?, Y = ?, Z = ?, RotZ = ?, HP = ?, Colors = ?, Upgrades = ?, Paintjob = ?, DETRAN = ? WHERE Account = ? AND ID = ?", x, y, z, rz, getElementHealth(theVehicle), color, upgrade, Paintjob, DETRAN or false, getAccountName(getPlayerAccount(Owner)), id) updateVehicleInfo(Owner) local attached = getAttachedElements(theVehicle) if (attached) then for k,element in ipairs(attached) do if getElementType(element) == "blip" then destroyElement(element) end end end end destroyElement(theVehicle) end end addEvent("onBuyNewVehicle", true) addEventHandler("onBuyNewVehicle", root, function(Model, cost, r1, g1, b1, r2, g2, b2) abc = false local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ?", getAccountName(getPlayerAccount(source))), -1) for i, data in ipairs (data) do if data["Model"] == Model then abc = true break end end if #data >= 10 then outputChatBox("#838B83[#FFFF00BiC#838B83]#FFFF00 Voce Pode Comprar Apenas 10 Veiculos.", source, 38, 122, 216, true) return end if abc == true then return end if getPlayerMoney(source) >= tonumber(cost) then takePlayerMoney ( source, cost ) local x, y, z = getElementPosition(source) local _, _, rz = getElementRotation(source) local shopID = getElementData ( source, "atVehShop") local color = r1..","..g1..","..b1..","..r2..","..g2..","..b2 if shopID and shopsVehSpawns[shopID] then vehicle = createVehicle(Model, shopsVehSpawns[shopID][1], shopsVehSpawns[shopID][2], shopsVehSpawns[shopID][3], shopsVehSpawns[shopID][4], shopsVehSpawns[shopID][5], shopsVehSpawns[shopID][6]) else vehicle = createVehicle(Model, x-5, y+5, z, 0, 0, rz) end setVehicleColor(vehicle, r1, g1, b1, r2, g2, b2) setElementData(vehicle, "Owner", source) local NewID = getFreeID() local Placa = getElementData(vehicle,"Placa") if Placa == nil or not Placa then local NewPlate = getFreePlate(vehicle,id, source) end local Placa = getElementData(vehicle,"Placa") setElementData(vehicle, "ID", NewID) dbExec(db, "INSERT INTO VehicleList VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", NewID, Placa, getAccountName(getPlayerAccount(source)), Model, x-5, y+5, z, rz, color, "", 3, false, cost, 1000, 0) updateVehicleInfo(source) setElementData(vehicle, "ownercar", getAccountName(getPlayerAccount(source))) warpPedIntoVehicle ( source, vehicle ) vv[vehicle] = setTimer(function(source) if not isElement(source) then killTimer(vv[source]) vv[source] = nil end if isElement(source) and getElementHealth(source) <= 255 then setElementHealth(source, 255.5) setVehicleDamageProof(source, true) setVehicleEngineState(source, false) end end, 150, 0, vehicle) addEventHandler("onVehicleDamage", vehicle, function(loss) local account = getAccountName(getPlayerAccount(getElementData(source, "Owner"))) setTimer(function(source) if isElement(source) then dbExec(db, "UPDATE VehicleList SET HP = ? WHERE Account = ? AND Model = ?", getElementHealth(source), account, getElementModel(source)) updateVehicleInfo(getElementData(source, "Owner")) end end, 100, 1, source) end) addEventHandler("onVehicleEnter", vehicle, function(player) if getElementHealth(source) <= 255.5 then setVehicleEngineState(source, false) else if isVehicleDamageProof(source) then setVehicleDamageProof(source, false) end end end) else outputChatBox("#c1c1c1Você não tem dinheiro o suficiente para comprar este veiculo.", source, 38, 122, 216, true) end end) vv = {} function SaveVehicleDataOnQuit() local conta = getAccountName(getPlayerAccount(source)) for i, veh in ipairs (getElementsByType("vehicle")) do if getElementData(veh, "ownercar") == conta then if not veh then return end destroyVehicle(veh) end end end addEventHandler("onPlayerQuit", root,SaveVehicleDataOnQuit) addEvent("SpawnMyVehicle", true) addEventHandler("SpawnMyVehicle", root, function(id) local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id), -1) if type(data) == "table" and #data ~= 0 then if getVehicleByID(id) then outputChatBox("#c1c1c1O seu veiculo #FF0000"..(customCarNames[data[1]["Model"]] or getVehicleNameFromModel(data[1]["Model"])).." #c1c1c1já está spawnado.", source, 38, 122, 216, true) else local color = split(data[1]["Colors"], ',') r1 = color[1] or 255 g1 = color[2] or 255 b1 = color[3] or 255 r2 = color[4] or 255 g2 = color[5] or 255 b2 = color[6] or 255 local playerX, playerY, playerZ = getElementPosition(source) if data[1]["DETRAN"] ~= 1 then --vehicle = createVehicle(data[1]["Model"], data[1]["X"], data[1]["Y"], data[1]["Z"], 0, 0, data[1]["RotZ"]) vehicle = createVehicle(data[1]["Model"], playerX, playerY, playerZ, 0, 0, data[1]["RotZ"]) warpPedIntoVehicle(source, vehicle) setElementData(vehicle, "ID", id) setElementData(vehicle, "Travado", false) outputChatBox("#c1c1c1O seu veiculo #FF0000"..(customCarNames[data[1]["Model"]] or getVehicleNameFromModel(data[1]["Model"])).." #c1c1c1foi spawnado.", source, 38, 122, 216, true) else outputChatBox("#c1c1c1O seu veiculo #FF0000"..(customCarNames[data[1]["Model"]] or getVehicleNameFromModel(data[1]["Model"])).." #c1c1c1foi spawnado no DETRAN, pois você deslogou com ele travado lá!.", source, 38, 122, 216, true) vehicle = createVehicle(data[1]["Model"], 1650.327, -1088.778, 23.906, 5, 5, data[1]["RotZ"]) setElementData(vehicle, "ID", id) setElementData(vehicle, "Travado", true) end local upd = split(tostring(data[1]["Upgrades"]), ',') for i, upgrade in ipairs(upd) do addVehicleUpgrade(vehicle, upgrade) end local Paintjob = data[1]["Paintjob"] or 3 setVehiclePaintjob(vehicle, Paintjob) setVehicleColor(vehicle, r1, g1, b1, r2, g2, b2) if tonumber(data[1]["HP"]) <= 255.5 then data[1]["HP"] = 255 end if data[1]["new_hydr"] and data[1]["new_hydr"] == 1 then setElementData(vehicle, "NewHydr", true) else setElementData(vehicle, "NewHydr", false) end Placa = data[1]["Placa"] setElementData(vehicle, "Placa",Placa) setElementData(vehicle, "ownercar", getAccountName(getPlayerAccount(source))) setElementHealth(vehicle, data[1]["HP"]) setElementData(vehicle, "Owner", source) local Placa = getElementData(vehicle,"Placa") if Placa == nil or not Placa then local NewPlate = getFreePlate(vehicle,id, source) end vv[vehicle] = setTimer(function(source) if not isElement(source) then killTimer(vv[source]) vv[source] = nil end if isElement(source) and getElementHealth(source) <= 255 then setElementHealth(source, 255.5) setVehicleDamageProof(source, true) setVehicleEngineState(source, false) end end, 50, 0, vehicle) addEventHandler("onVehicleDamage", vehicle, function(loss) local account = getAccountName(getPlayerAccount(getElementData(source, "Owner"))) setTimer(function(source) if isElement(source) then dbExec(db, "UPDATE VehicleList SET HP = ? WHERE Account = ? AND Model = ?", getElementHealth(source), account, getElementModel(source)) updateVehicleInfo(getElementData(source, "Owner")) end end, 100, 1, source) end) addEventHandler("onVehicleEnter", vehicle, function(player) if getElementHealth(source) <= 255.5 then setVehicleEngineState(source, false) else if isVehicleDamageProof(source) then setVehicleDamageProof(source, false) end end end) setElementData(vehicle, "Owner", source) end else outputChatBox("#c1c1c1Há um problema com o veiculo, notifique o administrador.", source, 38, 122, 216, true) end end) addEvent("DestroyMyVehicle", true) addEventHandler("DestroyMyVehicle", root, function(id) local vehicle = getVehicleByID(id) if isElement(vehicle) then local posVehX, posVehY, posVehZ = getElementPosition(vehicle) local posSouX, posSouY, posSouZ = getElementPosition(source) if (getDistanceBetweenPoints3D(posVehX, posVehY, posVehZ, posSouX, posSouY, posSouZ)) <= 10 then local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id), -1) local DETRAN = getElementData(vehicle, "Travado") local DETRAN = getElementData(vehicle, "Rebocando") if DETRAN ~= true and DETRAN2 ~= true then if type(data) == "table" and #data ~= 0 then destroyVehicle(vehicle) outputChatBox ("#c1c1c1O seu veiculo #FF0000"..(customCarNames[data[1]["Model"]] or getVehicleNameFromModel(data[1]["Model"])).." #c1c1c1foi guardado.", source, 38, 122, 216, true) else outputChatBox("#c1c1c1Selecione um veiculo.", source, 38, 122, 216, true) end else outputChatBox("#c1c1c1O seu veiculo não pode ser guardado, pois está preso no DETRAN!.", source, 38, 122, 216, true) end else outputChatBox("#c1c1c1O seu veiculo não está perto de você o suficiente.", source, 38, 122, 216, true) end else outputChatBox("#c1c1c1O seu veiculo não foi spawnado.", source, 38, 122, 216, true) end end) addEvent("LockMyVehicle", true) addEventHandler("LockMyVehicle", root, function(id) local vehicle = getVehicleByID(id) if isElement(vehicle) then local posVehX, posVehY, posVehZ = getElementPosition(vehicle) local posSouX, posSouY, posSouZ = getElementPosition(source) if (getDistanceBetweenPoints3D(posVehX, posVehY, posVehZ, posSouX, posSouY, posSouZ)) <= 15 then if not isVehicleLocked(vehicle) then setVehicleLocked(vehicle, true) setVehicleDoorsUndamageable(vehicle, true) setVehicleDoorState(vehicle, 0, 0) setVehicleDoorState(vehicle, 1, 0) setVehicleDoorState(vehicle, 2, 0) setVehicleDoorState(vehicle, 3, 0) outputChatBox("#c1c1c1O seu veiculo #FF0000"..(customCarNames[getElementModel(vehicle)] or getVehicleNameFromModel(getElementModel(vehicle))).." #c1c1c1foi #FF0000fechado.", source, 38, 122, 216, true) elseif isVehicleLocked(vehicle) then setVehicleLocked(vehicle, false) setVehicleDoorsUndamageable(vehicle, false) outputChatBox("#c1c1c1O seu veiculo #FF0000"..(customCarNames[getElementModel(vehicle)] or getVehicleNameFromModel(getElementModel(vehicle))).." #c1c1c1foi #FF0000aberto.", source, 38, 122, 216, true) end else outputChatBox("#c1c1c1O controle do alarme do seu veiculo está fora do alcance.", source, 38, 122, 216, true) end else outputChatBox("#c1c1c1O seu veiculo não foi spawnado.", source, 38, 122, 216, true) end end) addEvent("BlipMyVehicle", true) addEventHandler("BlipMyVehicle", root, function(id) local vehicle = getVehicleByID(id) if isElement(vehicle) then if not getElementData(vehicle, "ABlip") then setElementData(vehicle, "ABlip", true) createBlipAttachedTo(vehicle, 41, 2, 255, 255, 255, 255, 255, 65535, source) outputChatBox("#c1c1c1O localizador do seu veiculo foi ativado, pressione a tecla f11 para encontrá-lo.", source, 38, 122, 216, true) else local attached = getAttachedElements(vehicle) if (attached) then for k,element in ipairs(attached) do if getElementType(element) == "blip" then destroyElement(element) end end end setElementData(vehicle, "ABlip", false) outputChatBox("#c1c1c1O localizador do seu veiculo foi desativado.", source, 38, 122, 216, true) end else outputChatBox("#c1c1c1O seu veiculo não foi spawnado.", source, 38, 122, 216, true) end end) addEvent("SellMyVehicle", true) addEventHandler("SellMyVehicle", root, function(id) local vehicle = getVehicleByID(id) local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id), -1) if type(data) == "table" and #data ~= 0 then local Money = math.ceil((data[1]["Cost"]*.9)*math.floor(data[1]["HP"])/120/12) givePlayerMoney (source, Money) if isElement(vehicle) then destroyElement(vehicle) end dbExec(db, "DELETE FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id) updateVehicleInfo(source) outputChatBox("#c1c1c1Você vendeu o seu veiculo por R$: "..Money, source, 38, 122, 216, true) end end) function getDataOnLogin(_, account) updateVehicleInfo(source) end addEventHandler("onPlayerLogin", root, getDataOnLogin) addEvent("inviteToBuyCarSended", true) addEventHandler("inviteToBuyCarSended", root, function(player, price, veh_name, veh_id) if player and price and veh_name and veh_id then local pl = getPlayerFromName ( player ) if pl then triggerClientEvent ( pl, "recieveInviteToBuyCar", pl, getPlayerName (source), getAccountName(getPlayerAccount(source)), price, veh_name, veh_id ) else outputChatBox("#c1c1c1O jogador não foi encontrado.", source, 38, 122, 216, true) triggerClientEvent ( source, "cleanCarInvitations", source ) end end end) addEvent("invitationBuyCarNotAccepted", true) addEventHandler("invitationBuyCarNotAccepted", root, function(player, acc, price, veh_name, veh_id) local pl = getPlayerFromName ( player ) if pl then triggerClientEvent ( pl, "cleanCarInvitations", pl ) outputChatBox("#c1c1c1O jogador recusou a sua oferta.", pl, 38, 122, 216, true) end end) addEvent("invitationBuyCarAccepted", true) addEventHandler("invitationBuyCarAccepted", root, function(player, acc, price, veh_name, veh_id) local pl = getPlayerFromName ( player ) local avail = false if pl and getAccountName ( getPlayerAccount (pl)) == acc then avail = true triggerClientEvent ( pl, "cleanCarInvitations", pl ) else for i, v in ipairs( getElementsByType ( 'player' ) ) do if getAccountName(getPlayerAccount ( v )) == acc then avail = true pl = v break end end end price = tonumber(price) or 0 if avail then if isGuestAccount ( getPlayerAccount ( source ) ) then triggerClientEvent ( pl, "cleanCarInvitations", pl ) outputChatBox("#c1c1c1O jogador não se encontra logado.", pl, 38, 122, 216, true) outputChatBox("#c1c1c1Você não está logado.", source, 38, 122, 216, true) return true end if getPlayerMoney ( source ) >= price then local vehicle = getVehicleByID(tonumber(veh_id)) local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(pl)), veh_id), -1) if type(data) == "table" and #data ~= 0 and isElement ( vehicle ) then givePlayerMoney ( pl, price ) takePlayerMoney ( source, price ) dbExec(db, "UPDATE VehicleList SET Account = ? WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), getAccountName(getPlayerAccount(pl)), veh_id) updateVehicleInfo(source) updateVehicleInfo(pl) setElementData(vehicle, "Owner", source) setElementData(vehicle, "ownercar", getAccountName(getPlayerAccount(source))) outputChatBox("#c1c1c1Você vendeu o seu veiculo por "..price.." reais.", pl, 38, 122, 216, true) outputChatBox("#c1c1c1Você comprou um veiculo por "..price.." reais.", source, 38, 122, 216, true) triggerClientEvent ( pl, "cleanCarInvitations", pl ) else outputChatBox("#c1c1c1O veiculo não se encontra spawnado.", source, 38, 122, 216, true) outputChatBox("#c1c1c1O veiculo não se encontra spawnado.", pl, 38, 122, 216, true) triggerClientEvent ( pl, "cleanCarInvitations", pl ) end else outputChatBox("#c1c1c1Você não possui dinheiro suficiente.", source, 38, 122, 216, true) end else outputChatBox("#c1c1c1O jogador não foi encontrado.", source, 38, 122, 216, true) end end) function consultarPlaca(source, Command, Placa) local accName = getAccountName(getPlayerAccount(source)) if not isObjectInACLGroup("user."..accName,aclGetGroup("Policial", "DETRAN")) then return outputMessage( "Você não tem permissão para este comando.", source,"info") end local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Placa = ?", Placa), -1) if not getVehicleByPlate(Placa) then outputMessage( "Prenda o condutor Imediatamente.#FFFF00 Placa Fria", source,"info") return end if type(data) == "table" and #data ~= 0 then local dono = data[1]["Account"] local modelo = data[1]["Model"] local queixa = getElementData(getVehicleByPlate(Placa), "Roubado") or "Não" outputChatBox( "#FFFF00*________________________*", source, 255,255,255,true) outputChatBox( "#FFFF00*__Banco de Dados DETRAN__*", source, 255,255,255,true) outputChatBox( "Nome Do Veículo:#FFFF00"..customCarNames[data[1]["Model"]], source, 255,255,255,true) outputChatBox( "Conta Proprietário:#FFFF00"..dono, source, 255,255,255,true) outputChatBox( "Placa Consultada:#FFFF00"..Placa, source, 255,255,255,true) outputChatBox( "Queixa de roubo: #FFFF00"..queixa, source, 255,255,255,true) outputChatBox( "#FFFF00*________________________*", source, 255,255,255,true) else outputChatBox( "Veículo não spawnado ou inexistente", source,"info") end end addCommandHandler("consultar",consultarPlaca) function getPlayerID(id) v = false for i, player in ipairs (getElementsByType("player")) do if getElementData(player, "ID") == id then v = player break end end return v end function getVehicleByPlate(Placa) v = false for i, veh in ipairs (getElementsByType("vehicle")) do if getElementData(veh, "Placa") == Placa then v = veh break end end return v end local pedqueixa = createPed ( 281, 1580.2,-1634.6,13.6) local objporta1 = createObject (2959,1577.2,-1637.3,12.9,0,0,0) local objporta2 = createObject (2959,1577.2,-1637.3,12.6,0,0,0) local mkqueixa = createMarker(1580.01733, -1632.14722, 13.38281 -0.9, "cylinder", 1.3, 38, 122, 216) function msgqueixa(hitElement) if getElementType (hitElement) == "player" then outputMessage("Utilize o (/queixa [Placa Do Veiculo]) para prestar queixa de roubo", hitElement) end end addEventHandler("onMarkerHit", mkqueixa, msgqueixa) function prestqueixa(source, cmd, input) local veh = getVehicleByPlate(input) if not veh then outputMessage("Não existe um veículo com esta placa", source, "error") return end local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Placa = ?", input), -1) if type(data) == "table" and #data ~= 0 then local dono = data[1]["Account"] if isElementWithinMarker ( source, mkqueixa ) then if getAccountName(getPlayerAccount(source)) == dono then setElementData(veh, "Roubado", "Sim") outputMessage("Queixa de roubo prestada para seu veiculo. ", source) else outputMessage("Este veículo, não pertence a você ", source) end else outputMessage("Vá ao marker no DP, para prestar queixa! ", source) end end end addCommandHandler("queixa", prestqueixa) function levarveic(source, cmd, input) local veh = getVehicleByPlate(input) local Conta = getAccountName ( getPlayerAccount ( source ) ) if not veh then outputMessage("Não existe um veículo com esta placa", source) return end local x, y, z = getElementPosition(source) local counter = 0 for seat, player in pairs(getVehicleOccupants(veh)) do counter = counter + 1 end if counter > 0 then return end if isObjectInACLGroup ("user."..Conta, aclGetGroup ( "Console" ) ) then setElementPosition(veh, x + 2.5, y, z) setElementRotation(veh, 0, 0, 0) else outputMessage("Você não tem permissão para usar este comando", source) end end addCommandHandler("trazerveic", levarveic) function entrarcarroqueixa( player, seat, jacked ) local Placa = getElementData(source, "Placa") local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Placa = ?", Placa), -1) if type(data) == "table" and #data ~= 0 then local dono = data[1]["Account"] if getAccountName(getPlayerAccount(player)) == dono then setElementData(source, "Roubado", "Não") end end end addEventHandler ( "onVehicleEnter", getRootElement(), entrarcarroqueixa ) function outputMessage (text, player, r, g, b) return exports["notices"]:addNotification( player, text, "info"); end
-
Hello there, I'm looking for an intermediate (or above) scripter with a bit of graphics design experience and yes this is going to be paid work. It's a medium to small size project. Please be/have Good time management Ready to work daily Good vocabulary Respectful Available Patient Contact Feel free to reach out to me on Steam or pm me here, thanks for checking out my post and please get vaccincated. Yours (post covid), Vseven
-
im looking a script/scripter for my shooter server including race.zip, scoreboard etc. paymen via euro. contact for discord : ozy#0707
-
Queria editar um bau de armas e munição acrescentando um sistema onde a facção possa guardar uma quantia de dinheiro. Porém ela seria acessavel pela facção podendo adicionar uma quantia (todos os depositos seria acumulado em apenas uma conta bancaria) e retira-la. porem membros de corporação também teria acesso para apenas retirar dinheiro de la, assim esvaziando suposto "cofre". é possivel ?
-
Estoy creando un servidor de roleplay y necesito un scripter que me ayude ya que me faltan sistemas importantes como facciones, sistema de comida y bebida, etc. Cualquier interesado hableme al discord y le informare del proyecto y de las necesidades del mismo. Servidor: Extreme-RP Discord: FelipeKing#9931 Se busca: Scripter Con Conocimientos en Sistemas de RP Gracias por la ayuda!!??
-
Busco programador para un proyecto que tengo en mente y está ahora mismo en proceso, busco un programador para acelerar todo el proceso y ayudarnos mas aún, somos 8 personas y un youtuber mediano, el pago será negociable, el servidor será de roleplay, lo cual se necesitará scrips básicos como trabajos, hogares, etc. Pará más información comunicarse a: Discord: Gianluigi #1194 Whatsapp: +573024548913
-
- scripter
- programador
-
(and 2 more)
Tagged with:
-
Olá Se você sabe programar em Lua e QUER TRABALHAR DE FATO, entre em contato comigo caso queira ganhar dinheiro. Quero: 1 gamemode de Hot Pursuit - perseguição de polícia contra ladrão 1 gamemode de training - basicamente é só um painel pra escolher um mapa e treinar - Algumas customizações simples pra veículos - Uns paineis simples Se for pra ficar de enrolação, demorar 2 dias pra responder uma coisa simples, não dar nem sinal de vida de como está indo o projeto, não entre em contato. Caso queira se comprometer ao trabalho, fale comigo, que serás muito bem pago. Abraços Jayb
-
WARNING: [TESTE]/VIP_PAINEL/AirNew_s.lua236:Bad argument @ 'isObjectInACLGroup' [Expected acl-group at argument 2, got boolean] WARNING: [TESTE]/VIP_PAINEL/AirNew_s.lua241:Bad argument @ 'isObjectInACLGroup' [Expected acl-group at argument 2, got boolean] WARNING: [TESTE]/VIP_PAINEL/AirNew_s.lua246:Bad argument @ 'isObjectInACLGroup' [Expected acl-group at argument 2, got boolean] WARNING: [TESTE]/VIP_PAINEL/AirNew_s.lua251:Bad argument @ 'isObjectInACLGroup' [Expected acl-group at argument 2, got boolean] 231 function Verificar_VIP_AirNewSCR ( ) 232 for i, player in ipairs ( getElementsByType ( "player" ) ) do 233 local acc = getPlayerAccount ( player ) 234 if acc and not isGuestAccount ( acc ) then 235 local accName = getAccountName (acc) 236 if isObjectInACLGroup ("user."..accName, aclGetGroup (Grupo_01) ) then 237 setElementData ( player, "VIP_01", "Sim" ) 238 else 239 setElementData ( player, "VIP_01", "Não" ) 240 end 241 if isObjectInACLGroup ("user."..accName, aclGetGroup (Grupo_02) ) then 242 setElementData ( player, "VIP_02", "Sim" ) 243 else 244 setElementData ( player, "VIP_02", "Não" ) 245 end 246 if isObjectInACLGroup ("user."..accName, aclGetGroup (Grupo_03) ) then 247 setElementData ( player, "VIP_03", "Sim" ) 248 else 249 setElementData ( player, "VIP_03", "Não" ) 250 end 251 if isObjectInACLGroup ("user."..accName, aclGetGroup (Grupo_04) ) then 252 setElementData ( player, "VIP_04", "Sim" ) 253 else 254 setElementData ( player, "VIP_04", "Não" ) 255 end 256 end 257 end 258 end 259 setTimer ( Verificar_VIP_AirNewSCR, 1500, 0 )
- 1 reply
-
- me ajude por favor
- scripter
-
(and 1 more)
Tagged with:
-
ENGLISH: Hello, I need scripters to help me develop the servers in my community, there are 4 servers that will be hosted on December 25, for that reason I need a scripter to help me with the servers. I hope to have your help! SPANISH: Hola, necesito scripters que me ayuden a desarrollar los servidores de mi comunidad, son 4 servidores que se hostearan el 25 de diciembre, por esa razon es que necesito scripter que me ayuden con los servidores. Espero contar con su ayuda, gracias! Help Plis!
- 1 reply
-
- scripter
- scripters mta
-
(and 8 more)
Tagged with:
-
Se necesita Scripter urgente para servidor rpg, mandar discord, es un trabajo remunerado.
-
--------------------- -- Player Ranking List -- --------------------- WindowSiralama2 = guiCreateWindow(245, 115, 450, 500, "Sıralama", false) guiSetProperty(WindowSiralama2, "CaptionColour", "FF1C90E1") guiWindowSetSizable(WindowSiralama2, false) guiWindowSetMovable(WindowSiralama2,false) guiSetVisible(WindowSiralama2, false) guiSetAlpha(WindowSiralama2, 1) centerWindow(WindowSiralama2) KapatButonSiralama2 = guiCreateButton(340, 466, 100, 24, "Kapat", false, WindowSiralama2) guiSetProperty(KapatButonSiralama2, "NormalTextColour", "FF2CFB03") LevelSiralamaButton = guiCreateButton(10, 466, 100, 24, "Level", false, WindowSiralama2) guiSetProperty(LevelSiralamaButton, "NormalTextColour", "FF2CFB03") ParaSiralamaButton = guiCreateButton(120, 466, 100, 24, "Para(Banka)", false, WindowSiralama2) guiSetProperty(ParaSiralamaButton, "NormalTextColour", "FF2CFB03") ZamanSiralamaButton = guiCreateButton(230, 466, 100, 24, "Zaman", false, WindowSiralama2) guiSetProperty(ZamanSiralamaButton, "NormalTextColour", "FF2CFB03") WindowSiralamaList2 = guiCreateGridList(5, 20, 440, 440, false, WindowSiralama2) local column = guiGridListAddColumn(WindowSiralamaList2, "Sıra", 0.20 ) local column1 = guiGridListAddColumn(WindowSiralamaList2, "Oyuncu Adı", 0.40 ) local column2 = guiGridListAddColumn(WindowSiralamaList2, "Level", 0.30 ) guiGridListSetSortingEnabled(WindowSiralamaList2, false) WindowSiralamaList3 = guiCreateGridList(5, 20, 440, 440, false, WindowSiralama2) local column = guiGridListAddColumn(WindowSiralamaList3, "Sıra", 0.20 ) local column1 = guiGridListAddColumn(WindowSiralamaList3, "Oyuncu Adı", 0.40 ) local column2 = guiGridListAddColumn(WindowSiralamaList3, "Para", 0.30 ) guiGridListSetSortingEnabled(WindowSiralamaList3, false) guiSetVisible(WindowSiralamaList3,false) WindowSiralamaList4 = guiCreateGridList(5, 20, 440, 440, false, WindowSiralama2) local column = guiGridListAddColumn(WindowSiralamaList4, "Sıra", 0.20 ) local column1 = guiGridListAddColumn(WindowSiralamaList4, "Oyuncu Adı", 0.40 ) local column2 = guiGridListAddColumn(WindowSiralamaList4, "Zaman", 0.30 ) guiGridListSetSortingEnabled(WindowSiralamaList4, false) guiSetVisible(WindowSiralamaList4,false) addEvent("SetData",true) addEventHandler("SetData",root,function ( Table ) guiGridListClear( WindowSiralamaList2 ) for i = 1,30 do local row = guiGridListAddRow ( WindowSiralamaList2 ) if ( Table [ i ].score ) then ---> fr_client.lua:2192 guiGridListSetItemText( WindowSiralamaList2, row, column, Table[i].sira , false, false ) guiGridListSetItemText( WindowSiralamaList2, row, column1, tostring(Table[i].name) , false, false ) guiGridListSetItemText( WindowSiralamaList2, row, column2, Table [ i ].score , false, false ) guiGridListSetItemColor(WindowSiralamaList2, row, column1, 255, 255, 0) guiGridListSetItemColor(WindowSiralamaList2, row, column2, 0, 180, 255) guiGridListSetItemColor(WindowSiralamaList2, row, column, 255, 0, 0) end end end) addEvent("SetData2",true) addEventHandler("SetData2",root,function ( Table ) guiGridListClear( WindowSiralamaList4 ) for i = 1,30 do local row = guiGridListAddRow ( WindowSiralamaList4 ) if ( Table [ i ].score ) then ---> fr_client.lua:2208 guiGridListSetItemText( WindowSiralamaList4, row, column, Table[i].sira , false, false ) guiGridListSetItemText( WindowSiralamaList4, row, column1, tostring(Table[i].name) , false, false ) guiGridListSetItemText( WindowSiralamaList4, row, column2, Table [ i ].score , false, false ) guiGridListSetItemColor(WindowSiralamaList4, row, column1, 255, 255, 0) guiGridListSetItemColor(WindowSiralamaList4, row, column2, 0, 180, 255) guiGridListSetItemColor(WindowSiralamaList4, row, column, 255, 0, 0) end end end) addEvent("updateTopMoney",true) addEventHandler("updateTopMoney",root,function ( Table ) guiGridListClear( WindowSiralamaList3 ) for i = 1,30 do local row = guiGridListAddRow ( WindowSiralamaList3 ) if ( Table [ i ].score ) then ---> fr_client.lua:2224 guiGridListSetItemText( WindowSiralamaList3, row, column, Table[i].sira , false, false ) guiGridListSetItemText( WindowSiralamaList3, row, column1, tostring(Table[i].name) , false, false ) guiGridListSetItemText( WindowSiralamaList3, row, column2, "$"..formatNumber(tostring(Table[i].score)).."" , false, false ) guiGridListSetItemColor(WindowSiralamaList3, row, column1, 255, 255, 0) guiGridListSetItemColor(WindowSiralamaList3, row, column2, 0, 180, 255) guiGridListSetItemColor(WindowSiralamaList3, row, column, 255, 0, 0) end end end) addEventHandler ( "onClientGUIClick", resourceRoot,function() if source == KapatButonSiralama2 then guiSetVisible(WindowSiralama2,false) elseif source == LevelSiralamaButton then if not durum1 then triggerServerEvent("getTop4", localPlayer) durum1 = true setTimer(function() durum1 = false end,60000,1) end if guiGetVisible(WindowSiralamaList3) then guiSetVisible(WindowSiralamaList3,false) end if guiGetVisible(WindowSiralamaList4) then guiSetVisible(WindowSiralamaList4,false) end guiSetVisible(WindowSiralamaList2,true) elseif source == ParaSiralamaButton then if not durum2 then triggerServerEvent("getTop3", localPlayer) durum2 = true setTimer(function() durum2 = false end,60000,1) end if guiGetVisible(WindowSiralamaList2) then guiSetVisible(WindowSiralamaList2,false) end if guiGetVisible(WindowSiralamaList4) then guiSetVisible(WindowSiralamaList4,false) end guiSetVisible(WindowSiralamaList3,true) elseif source == ZamanSiralamaButton then if not durum3 then triggerServerEvent("getTop4", localPlayer) durum3 = true setTimer(function() durum3 = false end,60000,1) end if guiGetVisible(WindowSiralamaList2) then guiSetVisible(WindowSiralamaList2,false) end if guiGetVisible(WindowSiralamaList3) then guiSetVisible(WindowSiralamaList3,false) end guiSetVisible(WindowSiralamaList4,true) end end) function formatNumber(n) if (not n) then return "Error catching data" end local left,num,right = string.match(n,'^([^%d]*%d)(%d*)(.-)$') return left..(num:reverse():gsub('(%d%d%d)','%1,'):reverse())..right end Can you edit it, please? ERROR: [gameplay]\freeroam\fr_client.lua:2192 attempt to index field '?' (a nil value) ERROR: [gameplay]\freeroam\fr_client.lua:2208: attempt to index field '?' (a nil value) ERROR: [gameplay]\freeroam\fr_client.lua:2224 attempt to index field '?' (a nil value)
-
Need RPG scripter he will do something and i'll give him steam account have coast 180$ have CS:GO , GTA V , Rocket League , Arma3 and Rainbow Six Siege and more the steam account level 10 add me on discord : Smoker#8738 Facebook : https://www.facebook.com/profile.php?id=100009745308181
-
Hi, I am looking MTA Developer /Scripter with experience for the EPICQ.EU DayZ style server. PAID for work (Paypal) (Monthly) More information Discord: Mažvis#2014 Contact me only if you are good at Scripting.
-
Eu queria separar as funções de um script de bar ( Separar uma função pra cada bebida, Catuaba, Vodca e Cerveja ) pois é muito desorganizado e tambem porque coloquei um painel novo nesse script... ja tentei varias e varias vezes e todas deram errado; c.lua ( A Parte das funções que quero separar Antes ) Esse aqui funciona normalmente, mas o proximo que eu separei não funciona.. function clickEffectDrink(button,state) if button == "left" and state == "up" then if isMouseInPosition(drawDrinksBVS.bgCatuabaX, drawDrinksBVS.bgCatuabaY, drawDrinksBVS.bgCatuabaW, drawDrinksBVS.bgCatuabaH) then if (not isTimer(timerExpireDrinks)) then triggerServerEvent("server:onPlayerBuyDrinkBVS", resourceRoot, 200) else playSoundFrontEnd(6) outputChatBox("Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) end elseif isMouseInPosition(drawDrinksBVS.bgVodkaX, drawDrinksBVS.bgVodkaY, drawDrinksBVS.bgVodkaW, drawDrinksBVS.bgVodkaH) then if (not isTimer(timerExpireDrinks)) then triggerServerEvent("server:onPlayerBuyDrinkBVS", resourceRoot, 150) else playSoundFrontEnd(6) outputChatBox("Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) end elseif isMouseInPosition(drawDrinksBVS.bgCervejaX, drawDrinksBVS.bgCervejaY, drawDrinksBVS.bgCervejaW, drawDrinksBVS.bgCervejaH) then if (not isTimer(timerExpireDrinks)) then triggerServerEvent("server:onPlayerBuyDrinkBVS", resourceRoot, 100) else playSoundFrontEnd(6) outputChatBox("Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) end elseif isMouseInPosition(drawDrinksBVS.bgCloseX, drawDrinksBVS.bgCloseY, drawDrinksBVS.bgCloseW, drawDrinksBVS.bgCloseH) then if isEventHandlerAdded("onClientRender", root, drawDrinks) and isEventHandlerAdded("onClientClick", root, clickEffectDrink) then removeEventHandler("onClientRender", root, drawDrinks) removeEventHandler("onClientClick", root, clickEffectDrink) showCursor(false) end end end end c.lua ( Aqui eu refiz separando as funções das bebidas Catuaba, Vodca e Cerveja, adicionei algumas coisas a mais porque como eu disse, mudei o painel. ) function Catuaba(_,state) if isEventHandlerAdded("onClientRender", root, drawDrinks) then if state == "down" then if isCursorOnElement(screenW * 0.3522, screenH * 0.4714, screenW * 0.4632, screenH * 0.5143) then if (not isTimer(timerExpireDrinks)) then setBlur(false) triggerServerEvent("server:onPlayerBuyDrinkBVS", localPlayer, 200) removeEventHandler("onClientRender", root, drawDrinks) showChat(true) showCursor(false) playSound("sfx/hit.mp3", false) else playSound("sfx/hit.mp3", false) outputChatBox("#1066E7Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) end end end end end addEventHandler("onClientClick", root, Catuaba) function Vodca(_,state) if isEventHandlerAdded("onClientRender", root, drawDrinks) then if state == "down" then if isCursorOnElement(screenW * 0.3522, screenH * 0.4714, screenW * 0.4632, screenH * 0.5143) then if (not isTimer(timerExpireDrinks)) then setBlur(false) triggerServerEvent("server:onPlayerBuyDrinkBVS", localPlayer, 150) removeEventHandler("onClientRender", root, drawDrinks) showChat(true) showCursor(false) playSound("sfx/hit.mp3", false) else playSound("sfx/hit.mp3", false) outputChatBox("#1066E7Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) end end end end end addEventHandler("onClientClick", root, Vodca) function Cerveja(_,state) if isEventHandlerAdded("onClientRender", root, drawDrinks) then if state == "down" then if isCursorOnElement(screenW * 0.3522, screenH * 0.4714, screenW * 0.4632, screenH * 0.5143) then if (not isTimer(timerExpireDrinks)) then setBlur(false) triggerServerEvent("server:onPlayerBuyDrinkBVS", localPlayer, 100) removeEventHandler("onClientRender", root, drawDrinks) showChat(true) showCursor(false) playSound("sfx/hit.mp3", false) else playSound("sfx/hit.mp3", false) outputChatBox("#1066E7Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) end end end end end addEventHandler("onClientClick", root, Cerveja) Oque há de errado no script ? se puderem me informar o erro como sempre agradeço irmãos!
-
Boa noite, eu estudei um pouco na wiki e fiz um script de bar, assim, o script do bar não fui eu que fiz, apenas coloquei um painel e alguns sistemas, talvez eu venda + talvez não porque fiz outro parecido só que de limpar ficha e ficou mais exclusivo.. assim vamos lá, primeiramente são 4 bares, com o interior 11, assim que entra ne qualquer um deles, tem o ped, em cima do ped coloquei um dxDrawText mandando o player pressionar a letra "M" para abrir o cursor que é a função com nome de "Nametag", e depois clicar no ped para abrir o painel menu para compra a bebida que ele deseja, mas após abrir clicar no ped e o painel menu ter aberto, a função "Nametag" ( A que manda o player pressionar a letra M e clicar no ped, ou seja o texto continua no ped mesmo com o painel-menu aberto ), e também não seta o walkingStyle.. voces poderiam me informar o erro e como resolve-lo ? c.lua --[[ ################################################ # # # RESOURCE DESENVOLVIDO por: # # < #Horus > # # # # # ################################################ ]] local ped = createPed(240, 497.283, -77.876, 998.765, 0) local ped2 = createPed(240, 497.283, -77.876, 998.765, 0) local ped3 = createPed(240, 497.283, -77.876, 998.765, 0) local ped4 = createPed(240, 497.283, -77.876, 998.765, 0) setElementInterior(ped, 11) setElementDimension(ped, 1) setElementFrozen(ped, true) setElementInterior(ped2, 11) setElementDimension(ped2, 2) setElementFrozen(ped2, true) setElementInterior(ped3, 11) setElementDimension(ped3, 3) setElementFrozen(ped3, true) setElementInterior(ped4, 11) setElementDimension(ped4, 4) setElementFrozen(ped4, true) local dxfont0_fonte = dxCreateFont("font/fonte.ttf", 10) local screenW, screenH = guiGetScreenSize() local resW, resH = 1360,768 local x, y = (screenW/resW), (screenH/resH) function setBlur(state) setElementData(localPlayer, "showBlur", state) end function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end function dxDrawLinedRectangle( x, y, width, height, color, _width, postGUI ) _width = _width or 1 dxDrawLine ( x, y, x+width, y, color, _width, postGUI ) -- Top dxDrawLine ( x, y, x, y+height, color, _width, postGUI ) -- Left dxDrawLine ( x, y+height, x+width, y+height, color, _width, postGUI ) -- Bottom return dxDrawLine ( x+width, y, x+width, y+height, color, _width, postGUI ) -- Right end function cancelPedDamage(attacker) cancelEvent() end addEventHandler("onClientPedDamage", ped, cancelPedDamage) addEventHandler("onClientPedDamage", ped2, cancelPedDamage) addEventHandler("onClientPedDamage", ped3, cancelPedDamage) addEventHandler("onClientPedDamage", ped4, cancelPedDamage) function drawDrinks() tocolor1 = tocolor(0, 0, 0, 150) if isCursorOnElement(screenW * 0.3257, screenH * 0.4115, screenW * 0.3272, screenH * 0.0469) then -- CATUABA tocolor1 = tocolor(16, 102, 231, 100) end tocolor2 = tocolor(0, 0, 0, 150) if isCursorOnElement(screenW * 0.3257, screenH * 0.4583, screenW * 0.3272, screenH * 0.0469) then -- VODCA tocolor2 = tocolor(16, 102, 231, 100) end tocolor3 = tocolor(0, 0, 0, 150) if isCursorOnElement(screenW * 0.3257, screenH * 0.5052, screenW * 0.3272, screenH * 0.0469) then -- CERVEJA tocolor3 = tocolor(16, 102, 231, 100) end tocolorF = tocolor(217, 0, 5, 0) if isCursorOnElement(screenW * 0.6426, screenH * 0.3490, screenW * 0.0221, screenH * 0.0417) then -- CLOSE tocolorF = tocolor(217, 0, 5, 150) end -- ################# BACKGROUND ################# dxDrawRectangle(screenW * 0.3140, screenH * 0.3490, screenW * 0.3507, screenH * 0.3997, tocolor(0, 0, 0, 150), false) dxDrawRectangle(screenW * 0.3140, screenH * 0.3490, screenW * 0.3507, screenH * 0.0417, tocolor(0, 0, 0, 150), false) -- ################# BUTTONS ################# dxDrawRectangle(screenW * 0.3257, screenH * 0.4115, screenW * 0.3272, screenH * 0.0469, tocolor1, false) -- CATUABA dxDrawRectangle(screenW * 0.3257, screenH * 0.4583, screenW * 0.3272, screenH * 0.0469, tocolor2, false) -- VODCA dxDrawRectangle(screenW * 0.3257, screenH * 0.5052, screenW * 0.3272, screenH * 0.0469, tocolor3, false) -- CERVEJA dxDrawRectangle(screenW * 0.6426, screenH * 0.3490, screenW * 0.0221, screenH * 0.0417, tocolorF, false) -- CLOSE -- ################# IMAGENS ################# dxDrawImage(screenW * 0.3287, screenH * 0.4180, screenW * 0.0191, screenH * 0.0352, "", 0, 0, 0, tocolor(255, 255, 255, 217), false) dxDrawImage(screenW * 0.3287, screenH * 0.5573, screenW * 0.0191, screenH * 0.0339, "", 0, 0, 0, tocolor(255, 255, 255, 217), false) dxDrawImage(screenW * 0.3257, screenH * 0.6458, screenW * 0.0265, screenH * 0.0430, "", 0, 0, 0, tocolor(254, 254, 254, 205), false) dxDrawImage(screenW * 0.3287, screenH * 0.4661, screenW * 0.0191, screenH * 0.0352, "", 0, 0, 0, tocolor(255, 255, 255, 217), false) dxDrawImage(screenW * 0.3287, screenH * 0.5143, screenW * 0.0191, screenH * 0.0352, "", 0, 0, 0, tocolor(255, 255, 255, 217), false) dxDrawImage(screenW * 0.3287, screenH * 0.6042, screenW * 0.0191, screenH * 0.0339, "", 0, 0, 0, tocolor(255, 255, 255, 217), false) -- ################# TEXTOS ################# dxDrawText("Bar Passa Tempo - MENU", screenW * 0.4280, screenH * 0.3600, screenW * 0.4324, screenH * 0.3984, tocolor(255, 255, 255, 202), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("X", screenW * 0.6500, screenH * 0.3555, screenW * 0.7610, screenH * 0.3984, tocolor(255, 255, 255, 202), 1.30, "default-bold", "left", "top", false, false, false, true, false) dxDrawText("Catuaba", screenW * 0.3522, screenH * 0.4232, screenW * 0.4632, screenH * 0.4661, tocolor(255, 255, 255, 202), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("Vodca", screenW * 0.3522, screenH * 0.4714, screenW * 0.4632, screenH * 0.5143, tocolor(255, 255, 255, 202), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("Cerveja", screenW * 0.3522, screenH * 0.5183, screenW * 0.4632, screenH * 0.5573, tocolor(255, 255, 255, 202), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("#FF0000R$ #FFFFFF200", screenW * 0.6044, screenH * 0.4245, screenW * 0.7154, screenH * 0.4674, tocolor(255, 255, 255, 202), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("#FF0000R$ #FFFFFF150", screenW * 0.6044, screenH * 0.4674, screenW * 0.7154, screenH * 0.5104, tocolor(255, 255, 255, 202), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("#FF0000R$ #FFFFFF100", screenW * 0.6044, screenH * 0.5182, screenW * 0.7154, screenH * 0.5612, tocolor(255, 255, 255, 202), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("Selecione uma bebida abaixo:", screenW * 0.4350, screenH * 0.3898, screenW * 0.4324, screenH * 0.7487, tocolor(255, 255, 255, 202), 0.8, dxfont0_fonte, "left", "top", false, false, false, true, false) end function render() local screenx, screeny, worldx, worldy, worldz = getCursorPosition() local px, py, pz = getCameraMatrix() local hit, x, y, z, elementHit = processLineOfSight ( px, py, pz, worldx, worldy, worldz ) local tx, ty, tz = getElementPosition(localPlayer) local rx, ry, rz = getElementPosition(ped) local distancia = getDistanceBetweenPoints3D(tx, ty, tz, rx, ry, rz) if not isEventHandlerAdded("onClientRender", root, drawDrink) then if (distancia < 5) then if hit then if elementHit == ped then addEventHandler("onClientRender", root, drawDrinks) showCursor(true) showChat(false) setElementData(localPlayer, "showBlur", true) end if elementHit == ped2 then addEventHandler("onClientRender", root, drawDrinks) showCursor(true) showChat(false) setElementData(localPlayer, "showBlur", true) end if elementHit == ped3 then addEventHandler("onClientRender", root, drawDrinks) showCursor(true) showChat(false) setElementData(localPlayer, "showBlur", true) end if elementHit == ped4 then addEventHandler("onClientRender", root, drawDrinks) showCursor(true) showChat(false) setElementData(localPlayer, "showBlur", true) end end end end end addEventHandler("onClientClick", root, render) local rootElement = getRootElement() local screenWidth, screenHeight = guiGetScreenSize() local maxrange = 9 function Nametag() local pedX, pedY, pedZ = getElementPosition(ped) local sx, sy = getScreenFromWorldPosition (pedX,pedY,pedZ +1) local cameraX, cameraY, cameraZ = getCameraMatrix() if sx then if getDistanceBetweenPoints3D(cameraX,cameraY,cameraZ,pedX,pedY,pedZ) <= maxrange then if not getElementData(localPlayer, "showBlur") then dxDrawRectangle(sx - x*110,sy + y*57, screenW * 0.2514, screenH * 0.0630, tocolor(0, 0, 0, 165), false) dxDrawText("Garçom - Bebidas e Diversão;",sx - 25 ,sy + 60,screenWidth, screenHeight,tocolor ( 255, 255, 255, 230 ), 0.9,dxfont0_fonte) dxDrawText('Pressione #FF0000"M" #FFFFFFe clique no garçom para abrir o menu!',sx - 100,sy + 80,screenWidth, screenHeight,tocolor ( 255, 255, 255, 230 ), 0.8,dxfont0_fonte, "left", "top", false, false, false, true, false) end end end end addEventHandler("onClientRender",rootElement, Nametag) function closePanel(_,state) if isEventHandlerAdded("onClientRender", root, drawDrinks) then if state == "down" then if isCursorOnElement(screenW * 0.6426, screenH * 0.3490, screenW * 0.0221, screenH * 0.0417) then showCursor(false) showChat(true) playSound("sfx/hit.mp3", false) removeEventHandler("onClientRender", root, drawDrinks) setElementData(localPlayer, "showBlur", false) end end end end addEventHandler("onClientClick", root, closePanel) function Catuaba(_,state) if isEventHandlerAdded("onClientRender", root, drawDrinks) then if state == "down" then if isCursorOnElement(screenW * 0.3257, screenH * 0.4115, screenW * 0.3272, screenH * 0.0469) then setBlur(false) elseif (not isTimer(timerExpireDrinks)) then triggerServerEvent("server:onPlayerBuyDrinkBVS", resourceRoot, 200) else playSound("sfx/hit.mp3", false) outputChatBox("Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) removeEventHandler("onClientRender", root, drawDrinks) showCursor(false) end end end end addEventHandler("onClientClick", root, Catuaba) function Vodca(_,state) if isEventHandlerAdded("onClientRender", root, drawDrinks) then if state == "down" then if isCursorOnElement(screenW * 0.3257, screenH * 0.4583, screenW * 0.3272, screenH * 0.0469) then setBlur(false) elseif (not isTimer(timerExpireDrinks)) then triggerServerEvent("server:onPlayerBuyDrinkBVS", resourceRoot, 150) else playSound("sfx/hit.mp3", false) outputChatBox("Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) removeEventHandler("onClientRender", root, drawDrinks) showCursor(false) end end end end addEventHandler("onClientClick", root, Vodca) function Cerveja(_,state) if isEventHandlerAdded("onClientRender", root, drawDrinks) then if state == "down" then if isCursorOnElement(screenW * 0.3257, screenH * 0.5052, screenW * 0.3272, screenH * 0.0469) then setBlur(false) elseif (not isTimer(timerExpireDrinks)) then triggerServerEvent("server:onPlayerBuyDrinkBVS", resourceRoot, 100) else playSound("sfx/hit.mp3", false) outputChatBox("Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) removeEventHandler("onClientRender", root, drawDrinks) showCursor(false) end end end end addEventHandler("onClientClick", root, Cerveja) function currentEffectDrinks() ---------------------------------------------------------- timerControlDrinks = setTimer(function() setPedControlState(localPlayer, "walk", true) end, 100, 0) setWindVelocity(100, 100, 0) setCameraShakeLevel(255) ---------------------------------------------------------- timerExpireDrinks = setTimer(function() ---------------------------------------------------------- resetWindVelocity() setCameraShakeLevel(1) if isTimer(timerControlDrinks) then killTimer(timerControlDrinks) end setPedControlState(localPlayer, "walk", false) outputChatBox("O efeito da bebida acabou.", 0, 255, 0) triggerServerEvent("resetWalkingStyle",resourceRoot) ---------------------------------------------------------- end, math.random(40000, 60000), 1) end addEvent("client:currentEffectDrinks", true) addEventHandler("client:currentEffectDrinks", resourceRoot, currentEffectDrinks) function isCursorOnElement( posX, posY, width, height ) if isCursorShowing( ) then local mouseX, mouseY = getCursorPosition( ) local clientW, clientH = guiGetScreenSize( ) local mouseX, mouseY = mouseX * clientW, mouseY * clientH if ( mouseX > posX and mouseX < ( posX + width ) and mouseY > posY and mouseY < ( posY + height ) ) then return true end end return false end s.lua local markersBarPositions = { {2348.547, -1372.678, 24.398, 501.900, -67.600, 999.700, 11, 1}, -- 1 {1000.592, -919.914, 42.328, 501.900, -67.600, 999.700, 11, 2}, -- 2 {2369.240, 1984.234, 10.820, 501.900, -67.600, 999.700, 11, 3}, -- 3 {-2432.25, -183.043, 35.312, 501.900, -67.600, 999.700, 11, 4}, -- 4 } local markersBarEnter = {} local markersBarExit = {} for i=1, #markersBarPositions do local xEnter, yEnter, zEnter, xExit, yExit, zExit, intEnter, dimEnter = unpack(markersBarPositions[i]) markersBarEnter[i] = createMarker(xEnter, yEnter, zEnter+1, "arrow", 1.5, 0, 16, 102, 231) local blip = createBlip(xEnter, yEnter, zEnter, 49) setBlipVisibleDistance(blip, 300) markersBarExit[i] = createMarker(xExit, yExit, zExit+0.1, "arrow", 1.5, 255, 0, 0, 255) setElementInterior(markersBarExit[i], intEnter, xExit, yExit, zExit-1) setElementDimension(markersBarExit[i], dimEnter) function enterBarBV:~(hitElement, matchingDimension) if (getElementType(hitElement) == "player") and (matchingDimension) then local vehicle = getPedOccupiedVehicle(hitElement) local playerAccount = getPlayerAccount(hitElement) if (not vehicle) then if (playerAccount) then if (not isGuestAccount(playerAccount)) then setElementInterior(hitElement, intEnter, xExit, yExit-2, zExit) setElementDimension(hitElement, dimEnter) setElementPosition(hitElement, xExit, yExit-2, zExit) setElementRotation(hitElement, 0, 0, 180) end end end end end addEventHandler("onMarkerHit", markersBarEnter[i], enterBarBV:~) function exitBarBV:~(hitElement, matchingDimension) if (getElementType(hitElement) == "player") and (matchingDimension) then setElementInterior(hitElement, 0, xEnter, yEnter-5, zEnter) setElementDimension(hitElement, 0) setElementPosition(hitElement, xEnter, yEnter-5, zEnter) end end addEventHandler("onMarkerHit", markersBarExit[i], exitBarBV:~) end function onPlayerBuyDrinkBVS(price) local money = getPlayerMoney(client) if (money >= price) then takePlayerMoney(client, price) local atualHealth = getElementHealth(client) setElementHealth(client, atualHealth + 20) playSound("sfx/hit.mp3", false) ----------------------------------------------------- setPedWalkingStyle(client, 126) triggerClientEvent(client, "client:currentEffectDrinks", resourceRoot) ----------------------------------------------------- outputChatBox("Drink comprado com sucesso.", client, 16, 102, 231) else playSound("sfx/hit.mp3", false) outputChatBox("Você não possui dinheiro suficiente.", client, 255, 0, 0) end end addEvent("server:onPlayerBuyDrinkBVS", true) addEventHandler("server:onPlayerBuyDrinkBVS", resourceRoot, onPlayerBuyDrinkBVS) function resetWalkingStyle() setPedWalkingStyle(client, 0) end addEvent("resetWalkingStyle", true) addEventHandler("resetWalkingStyle", resourceRoot, resetWalkingStyle)
-
¡Te necesitamos! Somos un equipo experimentado que se dispone a reclutar ayudantes para un nuevo proyecto: Servidor MTA. Tenemos mucha experiencia tanto en MTA como en otros servidores valve, World of Warcraft, Unity 3D, Unreal Engine, entre otros. Si tienes ganas de unirte a nuestro equipo, te invito a seguir leyendo, y luego hablar conmigo por privado. Lo que estamos buscando: Equipo de GMs (admins) Equipo de Scripters de bajo nivel (No hace falta que seas experto, ya que los scripts complejos los haremos nosotros) Equipo de moderadores [GMs, admins] Equipo de Soporte [GM] Equipo de Publicidad ( Youtuber, Blogger, etc..) Equipo de Eventos Todos los miembros dentro de nuestros equipos tendrán su propia cuenta de GM (admin). Ten en cuenta que no estamos jugando, somos gente seria y bien preparada para este tipo de cosas. Si te interesa, envíame un mensaje privado a: https://www.facebook.com/halendor.nathrezhim.9 Comentando en qué tipo de equipo te gustaría entrar. Que tengan un buen día.
-
quando entro no navio de lv ganho dinheiro automaticamente... voces sabem como tiro isso ?
-
hellotianyuan#6990 ? Roleplay script. experienced scripter.
-
queria que assim q ele pegasse o trabalho, ele ter de ir buscar os passageiros no marker 1 da table, e depois ter de leva-los ao marker 2 da table. coloquei umas anims neles para eles irem andando em direçao ao avião, se algo estiver errado, se poderem corrigir e me falar oque errei eu agradeço, boa noite e feliz natal ae pra vcs. destinos = { [1] = {1612.7482910156, -2480.7473144531, 13.5546875}, -- table com todos os destinos em ordem. [2] = {-1487.8798828125, -108.69385528564, 14.1484375} } local Minicio7 = createMarker (1714.3579101563, 1615.6630859375, 9.2, "cylinder", 1, 16, 102, 231, 50) -- Cria o marker onde o player deve usar o comando. local veh = {} -- Cada elemento específico de cada jogador deve estar em uma table para ser criado e acessado corretamente. local Mfim7 = {} -- Marker final específico do player. local Bfim7 = {} -- Blip do marker final específico do player. function inicio7 (source) if source and getElementType (source) == "player" and not getPedOccupiedVehicle (source) then -- Quando o jogador colide no marker e está sem veículo, então: outputChatBox ("#1066E7──────────────── Trabalho BvP™ ────────────────",source,255,255,255,true) -- Avisa pra ele usar o comando /trampo4 para começar o emprego. outputChatBox ("#FF0000Trabalho de Piloto de Avião #FFFFFF→ Neste trabalho você terá de levar os passageiros até a marcação no radar. Sua recompensa é de R$8000.",source,255,255,255,true) outputChatBox (" ",source,255,255,255,true) outputChatBox ("* Digite #FF0000/emprego7 #FFFFFFpara aceitar o trabalho.",source,255,255,255,true) outputChatBox ("#1066E7───────────────────────────────────────────",source,255,255,255,true) end end addEventHandler ("onMarkerHit", Minicio7, inicio7) function startJob7 (thePlayer, cmd) if isElementWithinMarker (thePlayer, Minicio7) and not getPedOccupiedVehicle (thePlayer) then -- Ao usar o comando, só funciona se o jogador estiver no marker e estiver sem veículo. if veh[thePlayer] and isElement (veh[thePlayer]) then -- Se por acaso existir o veículo do trampo do jogador, destroi ele. destroyElement (veh[thePlayer]) veh[thePlayer] = nil end veh[thePlayer] = createVehicle (577, 1443.5461425781, 1459.3911132813, 10.8203125) -- Cria o veículo do trampo. local x, y, z = unpack (destinos[1]) -- x, y, z recebem as coordenadas do destinos[1]. Mfim7[thePlayer] = createMarker (x, y, z, "cylinder", 2, 0, 255, 0, 255, thePlayer) -- Cria o marker do objetivo do jogador na coordenada 1. setElementData (Mfim7[thePlayer], "owner", thePlayer) -- Seta esse jogador como dono do marker, para que só funcione com ele. setElementData (Mfim7[thePlayer], "trip", 1) -- Seta uma data no marker pra saber a qual coordenada ele pertence. Bfim7[thePlayer] = createBlipAttachedTo (Mfim7[thePlayer], 19) -- Cria o blip e anexa ao marker. warpPedIntoVehicle (thePlayer, veh[thePlayer]) -- Teleporta o player para o veículo do trampo. setPedSkin ( thePlayer, 72 ) dxMsg(thePlayer, "Vá buscar os passageiros.", "info") ped1 = createPed ( 1, 1591.1002197266,-2462.6525878906,13.5546875 ) setPedRotation(ped1, 181) ped2 = createPed ( 7, 1591.2203369141,-2459.6557617188,13.5546875 ) setPedRotation(ped2, 181) ped3 = createPed ( 15, 1591.1318359375,-2456.8723144531,13.5546875 ) setPedRotation(ped3, 181) dxMsg(thePlayer, "Os Passageiros estão entrando no avião aguarde...", "info") setPedAnimation( ped1, "ped", "WOMAN_walknorm") setPedAnimation( ped2, "ped", "WOMAN_walknorm") setPedAnimation( ped3, "ped", "WOMAN_walknorm") setTimer(function(thePlayer) destroyElement (ped1) destroyElement (ped2) destroyElement (ped3) dxMsg(thePlayer, "Os Passageiros entraram no avião, Leve-os até o aeropoto marcado no radar.", "info") -- Avisa o player o que ele tem que fazer agora. addEventHandler ("onMarkerHit", Mfim7[thePlayer], fim7) -- Adiciona o evento que faz funcionar o marker do objetivo. end, 7000, 1,thePlayer) end end addCommandHandler ("emprego7", startJob7) function fim7 (hitElement) if (hitElement == getElementData (source, "owner")) then -- Se o elemento que colidiu for o dono do marker, então: if veh[hitElement] and isElement(veh[hitElement]) then -- Se existe o veículo do trampo do jogador, então: if (getElementData (source, "trip") < #destinos) then -- Se a data do marker é menor que a quantidade de destinos, então: (indicando que não é a última viagem) local x, y, z = unpack (destinos[getElementData (source, "trip") + 1]) -- x, y, z recebem a próxima coordenada da table destinos. setElementPosition (source, x, y, z) -- Coloca o marker de objetivo nessa nova coordenada. setElementData (source, "trip", getElementData (source, "trip") + 1) -- Seta a nova viagem nesse marker. dxMsg(hitElement, "Você entregou os passageiros no local, Agora Volte com o avião para o aeroporto raiz marcado no radar!", "info") -- Avisa o jogador quantas viagens ele fez e quantas são no total, pra ele não pensar que está trabalhando de graça. else -- Se o marker de objetivo colidido não tem data menor que a quantidade de viagens, então: (indicando que esse é o último objetivo) dxMsg(hitElement, "Recebendo Pagamento...", "info") setTimer(function(hitElement) removeEventHandler ("onMarkerHit", Mfim7[hitElement], fim7) -- Remove o evento que ativa este marker, pois ele não será mais usado. destroyElement (veh[hitElement]) -- Destroi o veículo do trampo do jogador. givePlayerMoney (hitElement, 8000) -- Dá o dinheiro do trampo. if isElement(Bfim7[hitElement]) then destroyElement (Bfim7[hitElement]) end -- Destroi o blip anexado ao marker de objetivo. Bfim7[hitElement] = nil if isElement(Mfim7[hitElement]) then destroyElement (Mfim7[hitElement]) end -- Destroi o marker de objetivo. Mfim7[hitElement] = nil dxMsg(hitElement, "Pagamento recebido (R$ 8000)!", "sucess") -- Avisa o jogador que ele completou o trampo. end, 5000, 1,hitElement) end end end end function sair7 (thePlayer) if (veh[thePlayer]) and isElement(veh[thePlayer]) then -- Se o veículo do trampo existe, então: removeEventHandler ("onMarkerHit", Mfim7[thePlayer], fim7) -- Remove o evento que ativa o marker de objetivo. destroyElement (veh[thePlayer]) -- Destroi o veículo do trampo. destroyElement (Bfim7[thePlayer]) -- Destroi o blip de objetivo do trampo. Bfim7[thePlayer] = nil destroyElement (Mfim7[thePlayer]) -- Destroi o marker de objetivo do trampo. Mfim7[thePlayer] = nil dxMsg(thePlayer, "Você abandonou os passageiros e perdeu o trabalho idiota!", "error") -- Avisa o jogador que ele falhou no trampo. end end addEventHandler ("onVehicleExit", getRootElement(), sair7) -- Executa essa função quando o player sair de um veículo qualquer. function quit7 () if isElement(Bfim7[source]) then destroyElement (Bfim7[source]) end if isElement(Mfim7[source]) then destroyElement (Mfim7[source]) end if isElement(veh[source]) then destroyElement(veh[source]) end Bfim7[source] = nil Mfim7[source] = nil veh[source] = nil destroyElement (ped1) destroyElement (ped2) destroyElement (ped3) end addEventHandler("onPlayerQuit", getRootElement(), quit7) function kill7 () if isElement(Bfim7[source]) then destroyElement (Bfim7[source]) end if isElement(Mfim7[source]) then destroyElement (Mfim7[source]) dxMsg(source, "Você se matou e perdeu o trabalho seu imbecil!", "error") end if isElement(veh[source]) then destroyElement(veh[source]) end Bfim7[source] = nil Mfim7[source] = nil veh[source] = nil destroyElement (ped1) destroyElement (ped2) destroyElement (ped3) end addEventHandler("onPlayerWasted", getRootElement(), kill7) function logout7 () if isElement(Bfim7[source]) then destroyElement (Bfim7[source]) end if isElement(Mfim7[source]) then destroyElement (Mfim7[source]) end if isElement(veh[source]) then destroyElement(veh[source]) end Bfim7[source] = nil Mfim7[source] = nil veh[source] = nil destroyElement (ped1) destroyElement (ped2) destroyElement (ped3) end addEventHandler("onPlayerLogout", getRootElement(), logout7) function dxMsg(source, text, type) exports.dxmessages:outputDx(source, text, type) end Voces são uma segunda familia pra mim
-
Como faço pra quando alguem manda mensagem pro player, ele digita /r ( nome do player ) ( mensagem ) para responder automaticamente e ai por diante function privateMessage(thePlayer,commandName,sendToName,...) local pvWords = { ... } local pvMessage = table.concat( pvWords, " " ) if sendToName then if (getPlayerFromParticalName (sendToName)) then toPlayer = (getPlayerFromParticalName (sendToName)) if not (toPlayer == thePlayer) then if not (pvMessage == "") then outputChatBox("#00ff00[PV]#FFFFFF Enviada para #FFFFFF" .. getPlayerName(toPlayer) .. "#FFFFFF: " .. pvMessage, thePlayer, 255, 255, 255, true) outputChatBox("#00ff00[PV]#FFFFFF Recebida de #FFFFFF" .. getPlayerName(thePlayer) .. "#FFFFFF: " .. pvMessage, toPlayer, 255, 255, 255, true) else outputChatBox("#00ff00[PV]#FFFFFF Sintaxe inválida! Use:#FFFFFF /pv [Nome do Jogador] [Mansagem]", thePlayer, 255, 255, 255, true) return false end else outputChatBox("#00ff00[PV]#FFFFFF Você não pode mandar pv para si mesmo#FFFFFF!", thePlayer, 255, 255, 255, true) return false end else outputChatBox("#00ff00[PV]#FFFFFF Jogador não encontrado! #FFFF00(#FFFFFF"..sendToName.."#FFFF00)", thePlayer, 255, 255, 255, true) return false end else outputChatBox("#00ff00[PV]#FFFFFF Sintaxe inválida! Use:#FFFFFF /pv [Nome do Jogador] [Mensagem]", thePlayer, 255, 255, 255, true) return false end end addCommandHandler("pv", privateMessage) function infopv() outputChatBox ('',getRootElement(),255,255,255,true) end setTimer(infopv, 350000, 350) function getPlayerFromParticalName(thePlayerName) local thePlayer = getPlayerFromName(thePlayerName) if thePlayer then return thePlayer end for _,thePlayer in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), thePlayerName:lower(), 1, true) then return thePlayer end end return false end