Crazy Posted July 28, 2023 Share Posted July 28, 2023 Gostaria que minha lojinha adiciona-se 1 estrela a mais para a pessoa que efetua-se o assalto tentei de varias maneiras mas nao achei onde encaixa o commando SetPlayerWanted Script da lojinha abaixo --------- Variaveis local PedLoja03 = createPed(155, 2745.432, -2077.514, 13.554, 0) setElementFrozen(PedLoja03, true) setElementData(PedLoja03, "TS:Blindado", true) local BlipLoja = createBlipAttachedTo(PedLoja03, 17) setBlipVisibleDistance(BlipLoja , 150) local BlipLojaAssalta = createBlipAttachedTo(PedLoja03, 20) setElementVisibleTo(BlipLojaAssalta, root, false) ---- Sistema function IniciarAssalto03 (Ped) if Ped == PedLoja03 then local arma = getPedWeapon ( source ) if arma == 0 or arma == 1 or arma == 2 or arma == 3 or arma == 4 or arma == 5 or arma == 6 or arma == 7 or arma == 8 or arma == 9 or arma == 16 or arma == 17 or arma == 18 or arma == 39 or arma == 41 or arma == 42 or arma == 43 or arma == 10 or arma == 11 or arma == 12 or arma == 14 or arma == 28 or arma == 15 or arma == 44 or arma == 45 or arma == 46 or arma == 40 then return end if getElementData(source, "TS:Assaltando03") then return end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Policial")) then return end if getElementData(Ped, "TS:Assaltando03") then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffEssa loja foi assaltada recentemente!", "info") return end local x, y, z = getElementPosition( source ) local x1, y1, z1 = getElementPosition( Ped ) local distance = getDistanceBetweenPoints3D( x, y, z, x1, y1, z1 ) if distance >= 3 then return end triggerClientEvent(source, "TS:PainelAssalto03", source) end end addEventHandler ("onPlayerTarget", root, IniciarAssalto03) function ComecarAAssaltar (source) if getElementData(source, "TS:Assaltando03") then return end local arma = getPedWeapon ( source ) if arma == 0 or arma == 1 or arma == 2 or arma == 3 or arma == 4 or arma == 5 or arma == 6 or arma == 7 or arma == 8 or arma == 9 or arma == 16 or arma == 17 or arma == 18 or arma == 39 or arma == 41 or arma == 42 or arma == 43 or arma == 10 or arma == 11 or arma == 12 or arma == 14 or arma == 28 or arma == 15 or arma == 44 or arma == 45 or arma == 46 or arma == 40 then return end local Valor = math.random(460, 2000) setElementData(source, "TS:Assaltando03", true) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(PedLoja03, "SHOP", "SHP_Rob_GiveCash", -1, false) setElementFrozen(source, true) toggleAllControls(source, false) setElementPosition(source, 2745.397, -2075.392, 13.554) setElementRotation(source, -0, 0, 182.41223144531) setElementData(PedLoja03, "TS:Assaltando03", true) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) LojaAssaltada(source) triggerClientEvent(source, "TS:BarraDeProgresso03", source) setTimer(function() setPedAnimation(source, nil) setPedAnimation(PedLoja03, nil) setElementFrozen(source, false) toggleAllControls(source, true) givePlayerMoney(source, Valor) triggerClientEvent(source, "TS:BarraDeProgresso032", source) setElementData(source, "TS:Assaltando03", false) end, 2*10000, 1) end addEvent("TS:IniciarAssalto03", true) addEventHandler("TS:IniciarAssalto03", root, ComecarAAssaltar) function LojaAssaltada(source) setElementVisibleTo(BlipLoja, root, false) setElementVisibleTo(BlipLojaAssalta, root, true) outputChatBox("#FF0000BMA_Nᴇᴡs➢ #FFFFFFO jogador "..getPlayerName(source).." #FFFFFFestá assaltando a lojinha 03",root,255,0,0,true) setTimer(function() setElementVisibleTo(BlipLoja, root, true) setElementVisibleTo(BlipLojaAssalta, root, false) setElementData(PedLoja03, "TS:Assaltando03", false) end, 7*200000, 1 ) end Link to comment
Other Languages Moderators Lord Henry Posted July 28, 2023 Other Languages Moderators Share Posted July 28, 2023 Script ilegível. Faça a indentação correta do seu código. Link to comment
Crazy Posted August 6, 2023 Author Share Posted August 6, 2023 Tentei mas como o script não é meu não consegui fazer muito Link to comment
Recommended Posts