Jump to content

carlinloko

Members
  • Posts

    10
  • Joined

  • Last visited

Recent Profile Visitors

507 profile views

carlinloko's Achievements

Square

Square (6/54)

1

Reputation

  1. Interessante. Qual é a melhor maneira para verificar se esses dados foram enviados para o servidor? Já que, se tiver mais de um client, a função vai ser chamada mais de uma vez, certo?
  2. function Exit_Veh (thePed) if ( getElementModel ( source ) == 448 ) then if (Moto[thePed]) and isElement(Moto[thePed]) then exports.Scripts_dxInfo:dxInfoAddBox(thePed, "INFO : Você tem 1 minutos e meio para voltar pra van", "error") Tempo[thePed] = setTimer ( function(thePed) if isElement( Object_Pizza[thePed] ) then destroyElement( Object_Pizza[thePed] ) end if isElement( Marker_Entregar[thePed] ) then destroyElement( Marker_Entregar[thePed] ) end if isElement( Blip_Entregar[thePed] ) then destroyElement( Blip_Entregar[thePed] ) end if isElement( Marker_Moto[thePed] ) then destroyElement( Marker_Moto[thePed] ) end if isElement(Moto[thePed]) then destroyElement(Moto[thePed]) end removeCommandHandler("pizza", Pegar_Pizza_Object) setElementData(thePed, "Entrega_Acionada", false) setElementData(thePed, "DNL:Entregar_Pizzas", false) setElementData( thePed, "DNL:Pizza", 0 ) exports.Scripts_dxInfo:dxInfoAddBox(thePed, "INFO : Sua moto foi destruida e seu emprego foi encerrado", "error") end, 30000, 1, thePed ) end end end addEventHandler ("onVehicleExit", root, Exit_Veh) function Enter_Veh (thePed) if (Moto[thePed]) and isElement(Moto[thePed]) then if isTimer(Tempo[thePed]) then killTimer(Tempo[thePed]) end end end addEventHandler ("onVehicleEnter", root, Enter_Veh)
  3. Tem que setar o pickup no interior que você quer Utilize setElementInterior
  4. testa ae local Tempo = { } function Exit_Veh ( thePed ) if ( getElementModel ( source ) == 413 ) then if ( Carro[thePed] ) and isElement ( Carro[thePed] ) then triggerClientEvent ( thePed, "addBox", root, "INFO : Você tem 5 minutos para voltar pra van", "info" ) Tempo[thePed] = setTimer ( function ( thePed ) if ( isElement ( Object_Caixa[thePed] ) ) then destroyElement ( Object_Caixa[thePed] ) end if ( isElement ( Marker_Entregar[thePed] ) ) then destroyElement ( Marker_Entregar[thePed] ) end if ( isElement ( Blip_Entregar[thePed] ) ) then destroyElement ( Blip_Entregar[thePed] ) end if ( isElement ( Marker_Van[thePed] ) ) then destroyElement ( Marker_Van[thePed] ) end destroyElement ( Carro[thePed] ) removeCommandHandler("caixa", Pegar_Caixa_Object) setElementData ( thePed, "Entrega_Acionada", false ) setElementData ( thePed, "DNL:Entregar_Cargas", false ) setElementData( thePed, "DNL:Cargas", 0 ) triggerClientEvent ( thePed, "addBox", root, "INFO : Sua van foi destruida e seu emprego foi encerrado", "info" ) end, 300000, 1, thePed ) end end end addEventHandler ( "onVehicleExit", root, Exit_Veh ) function Enter_Veh ( thePed ) if ( Carro[thePed]) and isElement ( Carro[thePed] ) then if ( isTimer( Tempo[thePed] ) ) then killTimer ( Tempo[thePed] ) end end end addEventHandler ( "onVehicleEnter", root, Enter_Veh )
  5. Não testei local function getPlayerFromID(theID) local theID = tonumber(theID) if not theID then return false end local players = getElementsByType("player") for i = 1, #players do local player = players[i] local ID = tonumber(getElementData(player, "ID")) or false if ID and ID == theID then return player end end return false end local function giveWeaponCommand(player, command_name, target_id, weaponID, ammunition) local target_id = tonumber(target_id) if not target_id then return false end local weaponID = tonumber(weaponID) if not weaponID then return false end local ammunition = tonumber(ammunition) if not ammunition then return false end local target_player = getPlayerFromID(target_id) if not isElement(target_player) then return false end giveWeapon(target_player, weaponID, ammunition, true) end addCommandHandler("setweapon", giveWeaponCommand)
  6. Depende de como é feito esse painel de banir. O tempo dele é por Element data ?
  7. https://wiki.multitheftauto.com/wiki/GuiCreateCheckBox https://wiki.multitheftauto.com/wiki/GuiCheckBoxGetSelected Não entendi muito bem oque você quer, mas talvez isso seja útil.
  8. function hit(element) if Markers.ID[source] then if getElementType(element) == "player" then if isObjectInACLGroup("user." ..getAccountName(getPlayerAccount(element)), aclGetGroup("AclPermitida")) then -- No lugar de "AclPermitida" troque para ACL que você deseja. triggerClientEvent(element, "TS:AbrirFArmas", element) end end end end addEventHandler("onMarkerHit", resourceRoot, hit)
×
×
  • Create New...