Jump to content

SINCRONIZAÇÃO DE MODS


Recommended Posts

eu gostaria de sincronizar meu mod policial com o de CNH, quando eu revisto o player ''X'' ele diz que ele não tem CNH ''X'' mesmo ele tendo passado no teste

script do detran (não está completo)

function Parte2 (source)
local Hab = getElementData(source, "TS:IniciandoHAB") or "Nenhuma"
if Hab == "Carro" then
setElementInterior(source, 0)
CarroAuto[source] = createVehicle(IDCarro, 1316.307, -1375.927, 13.361)
PedInstrutor[source] = createPed(SkinPed, 1316.307, -1375.927, 13.361)
setElementRotation(CarroAuto[source], -0.965, -1.163, 180.515)
triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffVocê iniciou a prova pratica, respeite os limites!", "info")
setElementVisibleTo(Marker1, source, true)
setElementVisibleTo(Blip_Hab1, source, true)
warpPedIntoVehicle ( source, CarroAuto[source] ) 
warpPedIntoVehicle ( PedInstrutor[source], CarroAuto[source], 1 ) 
setElementData(source, "TS:Hab", "Fase1")
elseif Hab == "Moto" then
setElementInterior(source, 0)
CarroAuto[source] = createVehicle(IDMoto, 1316.307, -1375.927, 13.361)
PedInstrutor[source] = createPed(SkinPed, 1316.307, -1375.927, 13.361)
setElementRotation(CarroAuto[source], -0.965, -1.163, 180.515)
triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffVocê iniciou a prova pratica, respeite os limites!", "info")
setElementVisibleTo(Marker1, source, true)
setElementVisibleTo(Blip_Hab1, source, true)
warpPedIntoVehicle ( source, CarroAuto[source] ) 
warpPedIntoVehicle ( PedInstrutor[source], CarroAuto[source], 1 ) 
setElementData(source, "TS:Hab", "Fase1")
elseif Hab == "Caminhao" then
setElementInterior(source, 0)
CarroAuto[source] = createVehicle(IDCaminhao, 1316.307, -1375.927, 13.361)
PedInstrutor[source] = createPed(SkinPed, 1316.307, -1375.927, 13.361)
setElementRotation(CarroAuto[source], -0.965, -1.163, 180.515)
triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffVocê iniciou a prova pratica, respeite os limites!", "info")
setElementVisibleTo(Marker1, source, true)
setElementVisibleTo(Blip_Hab1, source, true)
warpPedIntoVehicle ( source, CarroAuto[source] ) 
warpPedIntoVehicle ( PedInstrutor[source], CarroAuto[source], 1 ) 
setElementData(source, "TS:Hab", "Fase1")
elseif Hab == "Carretas" then
setElementInterior(source, 0)
CarroAuto[source] = createVehicle(IDCarreta, 1316.68, -1388.448, 14.459)
setTimer(function()
CargaCarreta[source] = createVehicle(IDCarga, 1316.088, -1377.502, 14.276)
setElementRotation(CargaCarreta[source], 0, 0, 180)
end, 500, 1)
PedInstrutor[source] = createPed(SkinPed, 1316.307, -1375.927, 13.361)
setElementRotation(CarroAuto[source], -0.965, -1.163, 180.515)
triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffVocê iniciou a prova pratica, pegue a carga!", "info")
setElementVisibleTo(Marker1, source, true)
setElementVisibleTo(Blip_Hab1, source, true)
warpPedIntoVehicle ( source, CarroAuto[source] ) 
warpPedIntoVehicle ( PedInstrutor[source], CarroAuto[source], 1 ) 
setElementData(source, "TS:Hab", "Fase1")
end
end
addEvent ( "TS:Parte2", true ) 
addEventHandler ( "TS:Parte2", root, Parte2 )

function ChegangoNoMarker (source)
local Verificacao = getElementData(source, "TS:Hab") or "Nenhuma"
if Verificacao == "Fase1" then
triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffVa para o proximo checkpoint", "info")
setElementData(source, "TS:Hab", "Fase2")
setElementVisibleTo(Marker1, source, false)
setElementVisibleTo(Blip_Hab1, source, false)
setElementVisibleTo(Marker2, source, true)
setElementVisibleTo(Blip_Hab2, source, true)
local Hab2 = getElementData(source, "TS:IniciandoHAB") or "Nenhuma"
if Hab2 == "Carretas" then
if not ( getVehicleTowedByVehicle ( CarroAuto[source] ) == CargaCarreta[source] ) then
destroyElement(CarroAuto[source])
destroyElement(CargaCarreta[source])
destroyElement(PedInstrutor[source])
setElementVisibleTo(Marker2, source, false)
setElementVisibleTo(Blip_Hab2, source, false)
setElementData(source, "TS:Hab", nil)
triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffVocê tentou burlar o sistema e foi reprovado!", "info")
end
end
end
end

 

 

script policial 

 

 

function Revistar (source)
local Jogador = getElementData(source, "TS:Abordando")
if Jogador then
setPedAnimation( source, "POLICE", "plc_drgbst_01", 3100, true, false, false, false)
triggerClientEvent(Jogador, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffO Policial está te revistando!", "info")
if getPlayerWantedLevel(Jogador) >= 1 then
outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff O jogador está pedido!",source,255,0,0,true)
else
outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff O jogador não está pedido!",source,255,0,0,true)
end
if getElementData(Jogador,"DNL:Categoria(A)") == true then
outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff O jogador tem Habilitação A!",source,255,0,0,true)
else
outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff O jogador não tem Habilitação A!",source,255,0,0,true)
end
if getElementData(Jogador,"DNL:Categoria(B)") == true then
outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff O jogador tem Habilitação B!",source,255,0,0,true)
else
outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff O jogador não tem Habilitação B!",source,255,0,0,true)
end
if getElementData(Jogador,"DNL:Categoria(C)") == true then
outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff O jogador tem Habilitação C!",source,255,0,0,true)
else
outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff O jogador não tem Habilitação C!",source,255,0,0,true)
end
if getElementData(Jogador,"DNL:Categoria(D)") == true then
outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff O jogador tem Habilitação D!",source,255,0,0,true)
else
outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff O jogador não tem Habilitação D!",source,255,0,0,true)
end
if getElementData(Jogador,"DNL:Categoria(E)") == true then
outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff O jogador tem Habilitação E!",source,255,0,0,true)
else
outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff O jogador não tem Habilitação E!",source,255,0,0,true)
end
local Quantidade = getElementData(source, "TS:"..Droga_Selecionada.."") or 0
for slot = 0, 12 do
local Armamento = getPedWeapon ( Jogador, slot )
if Armamento > 0 then 
local NomeDaArma = getWeaponNameFromID ( Armamento )
outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff O jogador tem "..NomeDaArma.."!",source,255,0,0,true)
end
end
end
end
addEvent("TS:Revistar", true)
addEventHandler("TS:Revistar", root, Revistar)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...