Jump to content

Stronger

Members
  • Posts

    115
  • Joined

  • Last visited

Everything posted by Stronger

  1. Você deve saber, nós não sabemos como o seu sistema funciona. é simplesmente o jail do Al3grab Server-Side --***********************************-- --***********************************-- -- Jail System -- -- By Al3grab -- -- Server Side -- --***********************************-- --***********************************-- Command = get("command") -- getTheCommand rRoot = getResourceRootElement(getThisResource()) ------ function getData(to) local file = xmlLoadFile("data.xml") jTable = {} tTable = {} if file then for k,v in ipairs (xmlNodeGetChildren(xmlFindChild(file,"Jails",0)))do local name = xmlNodeGetAttribute(v,"name") local posX,posY,posZ = xmlNodeGetAttribute(v,"posX"),xmlNodeGetAttribute(v,"posY"),xmlNodeGetAttribute(v,"posZ") local int = xmlNodeGetAttribute(v,"int") local dim = xmlNodeGetAttribute(v,"dim") table.insert(jTable, {name,posX,posY,posZ,int,dim}) end for k,v in ipairs (xmlNodeGetChildren(xmlFindChild(file,"time",0)))do local times = xmlNodeGetAttribute(v,"times") for i =1,50 do local iTime = gettok ( times, i, string.byte(',') ) if iTime then -- if tonumber(iTime) > 59.5 then iTime = math.floor(iTime / 60) iTimeDes = "Minutos" if iTime > 59.5 then iTime = math.floor(iTime / 60) iTimeDes = "Horas" end else iTimeDes = "Segundos" end table.insert(tTable,{iTime,iTimeDes}) end end end end triggerClientEvent(to,"sendDataz",to,jTable,tTable) -- sending to client event end addEvent("getDataz",true) addEventHandler("getDataz",root,getData) addCommandHandler ( Command, -- Adding The Command Handler function ( player, cmd ) if hasObjectPermissionTo ( player, "function.banPlayer" ) then triggerClientEvent(player,"jailShow",player) else outputChatBox(" Acesso Negado Apenas ( Adminstradores ou Policias Podem Usar Este Comando) ",player,255,0,0) end end ) anims = { "F_smklean_loop", "M_smklean_loop", "M_smkstnd_loop", "M_smk_drag", "M_smk_in", "M_smk_loop", "M_smk_out", "M_smk_tap" , } function removeVehicle(thePlayer) if isPedInVehicle(thePlayer) then destroyElement(getPedOccupiedVehicle(thePlayer)) end end function JailHim(jailed,theJails,time,timeDes,showWho,timeReady) thePlayer = getPlayerFromName(jailed) if not thePlayer then outputChatBox("** #FFFF00Por Favor Selecione um Jogador !",source,255,0,0,true) return end removePedFromVehicle(thePlayer) for k,v in ipairs ( jTable ) do if theJails == v[1] then theJail = v end end if theJail then if tostring(time) then if timeReady == true then theTimex = tonumber(time) else theTimex = gettok ( time, 1, string.byte(timeDes) ) end if timeDes == "Horas" then theTimex = math.floor(theTimex*60*60*1000) elseif timeDes == "Minutos" then theTimex = math.floor(theTimex*60*1000) elseif timeDes == "Segundos" then theTimex = math.floor(theTimex*1000) end startJailTimer ( thePlayer , theTimex ) local x,y,z = theJail[2],theJail[3],theJail[4] local int = theJail[5] local dim = theJail[6] setElementInterior ( thePlayer, int ) setElementDimension ( thePlayer, dim ) setElementPosition (thePlayer,x,y,z ) setElementData(thePlayer,"jailed",true) setElementData(rRoot,""..getPlayerSerial(thePlayer).."-j",true) toggleControl(thePlayer,"fire",false) if showWho ~= true then outputChatBox("** #FFFF00Você Prendeu [ "..getPlayerName(thePlayer).." #FFFF00] na "..theJail[1].." Por "..time,source,255,0,0,true) outputChatBox("** #FFFF00Você Foi Preso por [ "..getPlayerName(source).." #FFFF00] na "..theJail[1].." Por "..time,thePlayer,255,0,0,true) end outputChatBox("** #FFFF00[ "..getPlayerName(thePlayer).." #FFFF00] Foi Preso por "..time,root,255,0,0,true) local randomAnim setPedAnimation(thePlayer,"SMOKING",anims[math.random(#anims)],theTimex/2) else outputChatBox("** #FFFF00Por Favor, Selecione o Tempo que o Jogador Será Preso !",source,255,0,0,true) end else outputChatBox("** #FFFF00Por Favor, Selecione uma Prisão !",source,255,0,0,true) end end addEvent("JailHimx",true) addEventHandler("JailHimx",root,JailHim) function unJailHim(jailed,showWho) thePlayer = getPlayerFromName(jailed) if not thePlayer then outputChatBox("** #FFFF00Por Favor Selecione um Jogador !",source,255,0,0,true) return end --if getElementData(thePlayer,"jailed") == true then setElementInterior ( thePlayer, 0) setElementDimension ( thePlayer, 0 ) setElementPosition ( thePlayer, 1552.9108886719, -1675.5844726563, 16.1953125) setElementData(thePlayer,"jailed",false) setElementData(rRoot,""..getPlayerSerial(thePlayer).."-j",false) if showWho ~= true then outputChatBox("** #FFFF00Você Foi Liberado [ "..getPlayerName(thePlayer).." #FFFF00]",source,255,0,0,true) outputChatBox("** #FFFF00Você Foi Liberado por [ "..getPlayerName(source).." #FFFF00]",thePlayer,255,0,0,true) end outputChatBox("** #FFFF00[ "..getPlayerName(thePlayer).." #FFFF00] Você Acaba de ser Liberado ",root,255,0,0,true) setPedAnimation(thePlayer) stopJailTimer(Player) toggleControl(thePlayer,"fire",true) -- setTimer(killPed,1500,1,thePlayer) --else -- outputChatBox("The Player is Not Jailed !",source,255,0,0,true) --end end addEvent("unJailHim",true)-- unJail addEventHandler("unJailHim",root,unJailHim) addEvent("onJailEnd",true) addEventHandler("onJailEnd",root,function(player) unJailHim(getPlayerName(player),true) end ) addEventHandler("onPlayerSpawn",root, -- Check If He Is Jailed [ OnSpawn ] function() if getElementData(source,"jailed") == true then randomJail = jTable[math.random(#jTable)] if randomJail then x,y,z = randomJail[2],randomJail[3],randomJail[4] int = randomJail[5] dim = randomJail[6] setElementInterior ( source, int ) setElementDimension(source,dim) setElementPosition (source,x,y,z ) end end end) addEventHandler("onPlayerJoin",root, -- Check If He Is Jailed - By Serial [ OnJoin ] function() if getElementData(rRoot,""..getPlayerSerial(source).."-j") == true then randomJail = jTable[math.random(#jTable)] if randomJail then x,y,z = randomJail[2],randomJail[3],randomJail[4] int = randomJail[5] dim = randomJail[6] setElementInterior ( source, int ) setElementDimension(source,dim) setElementPosition (source,x,y,z ) -- time = getElementData(rRoot,""..getPlayerSerial(source).."-t",time) or 5 * 1000 startJailTimer(source,time) setElementData(source,"jailed",true) end end end ) ---- function startJailTimer(Player,theTime) -- to start mission timer .. if Player then TimerDisplay = textCreateDisplay() m,s,cs = msToTimeStr(theTime) fullTime = m..":"..s TimerText = textCreateTextItem ( "O Tempo Acabou : "..tostring(fullTime).."", 0.39, 0.7 ,"medium",0,255,0,255,2.0,"left","center",255) textDisplayAddText ( TimerDisplay, TimerText ) textDisplayAddObserver ( TimerDisplay, Player ) sortTimerShit(Player,TimerText,theTime) end end --Robbed from JailTimerr resource , and it was robbed from arc_ function msToTimeStr(ms) if not ms then return '' end if ms < 0 then return "0","00","00" end local centiseconds = tostring(math.floor(math.fmod(ms, 1000)/10)) if #centiseconds == 1 then centiseconds = '0' .. centiseconds end local s = math.floor(ms / 1000) local seconds = tostring(math.fmod(s, 60)) if #seconds == 1 then seconds = '0' .. seconds end local minutes = tostring(math.floor(s / 60)) return minutes, seconds, centiseconds end function sortTimerShit(plr,timer,time) -- to sort timer's shit .. if timer and time then if isTimer(timerShitTimer) then killTimer(timerShitTimer) end timerShitTimer = setTimer(function(plr) time = time - 70 m,s,cs = msToTimeStr(time) fullTime = m..":"..s textItemSetText(timer,"Tempo Restante : "..tostring(fullTime).."") if plr then setElementData(rRoot,""..getPlayerSerial(plr).."-t",time) end if ( tonumber(m) <= 0 and tonumber(s) <= 0 and tonumber(cs) <= 0 ) then onTimerFinish(plr,timer) end end , 50 , 0 ,plr ) end end function stopJailTimer(Player) textDestroyDisplay(TimerDisplay) if TimerText then
  2. Alguem poderia mim ajuda com que comandos devo usar para criar um JoinQuit Nesse Estilo ?
  3. Testei o metodo do BeYourself so que não pegou , Tentei o Metodo do RooTs so que quando o player não é preso as estrelas vão sumindo tem algum comando para so sumir quando ele ser preso ?
  4. Iae galera tou aqui de novo para pedir uma ajuda tentei adicionar esse comando no Sistema de Prisão do Al3grab -- assume that there exists a collision shape named 'policeStation' function policeStationHit ( thePlayer ) setPlayerWantedLevel ( player, 0 ) -- set the player's wanted level to 6 stars outputChatBox ( getPlayerName ( thePlayer ) .. " entered the police station!" ) end -- call 'policeStationHit' when a player enters the collision shape: addEventHandler ( "onColShapeHit", policeStation, policeStationHit ) end So que quando adiciono o Comando no Server-Side o Painel /jail não abre
  5. Mais deixa pra la deixa no numeros superior mesmo VLW PELA AJUDA !
  6. ta abrindo so que com o botão de numero superior queria que abri-se com os numero da direita da setinha
  7. Tentei ja varios tipos so que não conseguir function createTheGate () myGate1 = createObject ( 10184, 322.79998779297, -1189.0999755859, 78.199996948242, 0, 0, 310 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate ( player ) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then moveObject ( myGate1, 2500, 322.79998779297, -1189.0999755859, 83.199996948242 ) end end addEventHandler( "onResourceStart", resourceRoot, function () for _,player in ipairs(getElementsByType"player") do bindKey(player, "2", "down", openMyGate) bindKey(player, "3", "down", movingMyGateBack) end end ) addEventHandler( "onPlayerJoin", root, function () for _,player in ipairs(getElementsByType"player") do bindKey(player, "2", "down", openMyGate) bindKey(player, "3", "down", movingMyGateBack) end end ) function movingMyGateBack ( player ) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then moveObject ( myGate1, 2500, 322.79998779297, -1189.0999755859, 78.199996948242 ) end end
  8. Mais para não adicionar o player eu adicionei o ACL Group
  9. Estou com esse gatescript ( script de portão ) so que queria trocar addComandHandler por BindKey ja tentei de varias formas mais não consegui alguem poderia mim ajudar ? function createTheGate () myGate1 = createObject ( 10184, 322.79998779297, -1189.0999755859, 78.199996948242, 0, 0, 310 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate ( player ) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then moveObject ( myGate1, 2500, 322.79998779297, -1189.0999755859, 83.199996948242 ) end end addCommandHandler("stronger1",openMyGate) function movingMyGateBack ( player ) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then moveObject ( myGate1, 2500, 322.79998779297, -1189.0999755859, 78.199996948242 ) end end addCommandHandler("stronger2",movingMyGateBack)
  10. Você pode usar o mega ou 4shared tem varias opções vai de gosto mesmo
  11. Alguem sabe o link de uma painel de tag para os donos das gang possam usar ?
  12. gostaria de criar um painel que o jogadores possam troca suas senhas e um painel que o Admin possam ver contas que estão a 15 dias off que comandos devo usar ?
  13. obrigado mais ja descobri oque o Editores usam eles usam Markers
  14. Mais esse trabalho não é tão dificil so quero que o player entre no marker ai ele vai ganhar um carro e tem que levar essse carro até outro marker se tomar dano de 50% no minimo
  15. Minuto 0:58 em diante Alguem sabe como faz esse " elevador " ?
  16. Acabei de ver que tinha criado um comando que quando o player está com a skin 287 ele não é alvejado + VLW PELA AJUDA
  17. Tipo eu adiciono o -- Se for uma team if getPlayerTeam("user." .. accountname, getTeamFromName("TESTE")) then so que quando vou testar ele não emite o sinal de alerta quando estou fora do "Grupo"
  18. Galera criei um script que quando qualquer player chega perto da area 51 recebe misseis na face , so que eu quero criar uma base do EB ( Exercito Brasileiro ) na area 51 como faço para os player que estiverem no grupo [ "EB" ] não ganhe seus misseis na face ?
  19. Gostaria de criar um trabalho de traficante de drogas mais como não entendo muito de .lua vim pedir ajudar de vocês para saber que comandos devo usar. ( *OBS : Eu sei que ja existe esse script na Community de um Brasileiro + Contem seu Creditos então resolvi fazer o meu próprio )
  20. Ja vi em varios servidores umas luzes de balada so que não sei qual é o id ou nome do item alguem poderia mim informar ( O lightbox1 eu ja sei queria outro tipo de luzes de balada )
×
×
  • Create New...