Szerző Téma: Telefon ( 104 , 105, 107 )  (Megtekintve 770 alkalommal)

Telefon ( 104 , 105, 107 )
« Dátum: 2014. December 06. - 18:49:17 »
0 Show voters
Hello! Azt szeretném kérdezni ,hogy hogyan csinhatnám meg azt, hogy 911 helyet 112 legyen. Mert átírtam a Dolgokat de azt rja h ne létezik a 112-es szám
Itt a Szerkesztett:
 
function isNumberAHotline(theNumber)
local challengeNumber = tonumber(theNumber)
return challengeNumber == 112 or challengeNumber == 107 or challengeNumber == 104 or challengeNumber == 105  or challengeNumber == 511 or challengeNumber == 921 or challengeNumber == 1501 or challengeNumber == 1502 or challengeNumber == 8294 or challengeNumber == 7331 or challengeNumber == 7332 or challengeNumber == 864
end
function routeHotlineCall(callingElement, callingPhoneNumber, outboundPhoneNumber, startingCall, message)
local callprogress = getElementData(callingElement, \"callprogress\")
if callingPhoneNumber == 112 then
-- 911: Emergency Services and Police.
-- Emergency calls that they need to respond to.
if startingCall then
   outputChatBox(\"112 Operátor [TELEFONBA]: Itt a Segély hívó! Kérjük mondja meg a helyzetét.\", callingElement)
   exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement, \"callprogress\", 1, false)
else
   if (callprogress==1) then -- Requesting the location
      exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement, \"call.location\", message, false)
      exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement, \"callprogress\", 2, false)
      outputChatBox(\"112 Operátor [TELEFONBA]: Kérem mondja el, hogy mi történt\", callingElement)
   elseif (callprogress==2) then -- Requesting the situation
      outputChatBox(\"112 Operátor [TELEFONBA]: Köszönjük a hívását. Az egységeink már úton vannak.\", callingElement)
      local location = getElementData(callingElement, \"call.location\")
 
      local playerStack = { }
      for key, value in ipairs( getPlayersInTeam( getTeamFromName( \"Orsuágos Rendőr Fő Kapitányság\" ) ) ) do
         table.insert(playerStack, value)
      end
      for key, value in ipairs( getPlayersInTeam( getTeamFromName( \"Nemzeti Adó-és Vámhivatal\" ) ) ) do
         table.insert(playerStack, value)
      end
      for key, value in ipairs( getPlayersInTeam( getTeamFromName( \"Országos Mentő Szolgálat\" ) ) ) do
         table.insert(playerStack, value)
      end
      for key, value in ipairs( getPlayersInTeam( getTeamFromName( \"Hivatalos Onkormányzati Tűzoltóság\" ) ) ) do
         table.insert(playerStack, value)
      end
      local affectedElements = { }
      for key, value in ipairs( playerStack ) do
         for _, itemRow in ipairs(exports[\'item-system\']:getItems(value)) do
            local setIn = false
            if (not setIn) and (itemRow[1] == 6 and itemRow[2] > 0) then
               table.insert(affectedElements, value)
               setIn = true
               break
            end
         end
      end
      for key, value in ipairs( affectedElements ) do
         outputChatBox(\"[RADIO] Itt a Diszpécser központ! Hívás érkezett  #\" .. outboundPhoneNumber .. \" számról!\", value, 0, 183, 239)
         outputChatBox(\"[RADIO] Kérem, hogy a megfelelő egység induljon a hívásra!\", value, 0, 183, 239)
         outputChatBox(\"[RADIO] Szituáció: \'\" .. message .. \"\' \", value, 0, 183, 239)
         outputChatBox(\"[RADIO] Helyzet: \'\" .. tostring(location) .. \"\' \", value, 0, 183, 239)
      end
      executeCommandHandler( \"hangup\", callingElement )
   end
end
elseif callingPhoneNumber == 107 then
if startingCall then
   outputChatBox(\"107 Operátor [TELEFONBA]: Itt a Rendőrség. Kérjük adja meg a Pozicióját.\", callingElement)
   exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement, \"callprogress\", 1, false)
else
   if (callprogress==1) then -- Requesting the location
      exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement, \"call.location\", message, false)
      exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement, \"callprogress\", 2, false)
      outputChatBox(\"107 Operátor [TELEFONBA]: Kérjük mondja el, hogy mi történt\", callingElement)
   elseif (callprogress==2) then -- Requesting the situation
      outputChatBox(\"107 Operátor [TELEFONBA]: Köszönjük a hívását. Az egységeink már úton vannak\", callingElement)
      local location = getElementData(callingElement, \"call.location\")
      local affectedElements = { }
      for key, value in ipairs( getPlayersInTeam( getTeamFromName( \"Országos Rendőr Fő Kapitányság\" ) ) ) do
         for _, itemRow in ipairs(exports[\'item-system\']:getItems(value)) do
            local setIn = false
            if (not setIn) and (itemRow[1] == 6 and itemRow[2] > 0) then
               table.insert(affectedElements, value)
               setIn = true
               break
            end
         end
      end
      for key, value in ipairs( affectedElements ) do
         outputChatBox(\"[RADIO] Itt a Diszpécser központ! Hívás érkezett #\" .. outboundPhoneNumber .. \" számról!\", value, 245, 40, 135)
         outputChatBox(\"[RADIO] Indok: \'\" .. message .. \"\' \", value, 245, 40, 135)
         outputChatBox(\"[RADIO] Helyzet: \'\" .. tostring(location) .. \"\' \", value, 245, 40, 135)
      end
      executeCommandHandler( \"hangup\", callingElement )
   end
end
elseif callingPhoneNumber == 104 then
if startingCall then
   outputChatBox(\"104 Operátor [TELEFONBA]: Itt az OMSZ! Kérjük mondja el a helyzetét.\", callingElement)
   exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement, \"callprogress\", 1, false)
else
   if (callprogress==1) then -- Requesting the location
      exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement, \"call.location\", message, false)
      exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement, \"callprogress\", 2, false)
      outputChatBox(\"104 Operátor [TELEFONBA]: Kérjük mondja el, hogy mi történt\", callingElement)
   elseif (callprogress==2) then -- Requesting the situation
      outputChatBox(\"104 Operátor [TELEFONBA]: Köszönjü a hívását! Az Egységeink már úton vannak!\", callingElement)         
      local location = getElementData(callingElement, \"call.location\")
      local affectedElements = { }
      for key, value in ipairs( getPlayersInTeam( getTeamFromName(\"Los Santos Medical Services\") ) ) do
         for _, itemRow in ipairs(exports[\'item-system\']:getItems(value)) do
            local setIn = false
            if (not setIn) and (itemRow[1] == 6 and itemRow[2] > 0) then
               table.insert(affectedElements, value)
               setIn = true
               break
            end
         end
      end            
      for key, value in ipairs( affectedElements ) do
         outputChatBox(\"[RADIO] Bejelentés érkezett a #\" .. outboundPhoneNumber .. \" számról!\", value, 245, 40, 135)
         outputChatBox(\"[RADIO] Indok: \'\" .. message .. \"\', Over.\", value, 245, 40, 135)
         outputChatBox(\"[RADIO] Helyzet: \'\" .. tostring(location) .. \"\', Out.\", value, 245, 40, 135)
      end
      executeCommandHandler( \"hangup\", callingElement )
   end      
end
elseif callingPhoneNumber == 511 then
if startingCall then
   outputChatBox(\"511 Operátor [TELEFONBA]: Üdvözlöm! Ön a szerelőket hívta! Adja meg a Helyzetét.\", callingElement)
   exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement, \"callprogress\", 1, false)
else
   if (callprogress==1) then -- Requesting the location
      exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement, \"call.location\", message, false)
      exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement, \"callprogress\", 2, false)
      outputChatBox(\"511 Operátor [TELEFONBA]: Kérjük mondja el ,hogy mi történt.\", callingElement)
   elseif (callprogress==2) then -- Requesting the situation
      outputChatBox(\"511 Operátor [TELEFONBA]: Köszönjük a bejelentést! A Szerelő(k) már úton vannak.\", callingElement)         
      local location = getElementData(callingElement, \"call.location\")
      local affectedElements = { }
      for key, value in ipairs( getPlayersInTeam( getTeamFromName(\"Jármű Szervíz\") ) ) do
         for _, itemRow in ipairs(exports[\'item-system\']:getItems(value)) do
            local setIn = false
            if (not setIn) and (itemRow[1] == 6 and itemRow[2] > 0) then
               table.insert(affectedElements, value)
               setIn = true
               break
            end
         end
      end      
      for key, value in ipairs( affectedElements ) do
         outputChatBox(\"[RADIO] Hívás érkezett! Egy autó mentőt kérnék a helyszínre!\", value, 245, 40, 135)
         outputChatBox(\"[RADIO] Szituáció: \'\" .. message .. \"\' \", value, 245, 40, 135)
         outputChatBox(\"[RADIO] Helyzet: \'\" .. tostring(location) .. \"\', Tell. Szám:: \"..outboundPhoneNumber..\" \", value, 245, 40, 135)
      end
      executeCommandHandler( \"hangup\", callingElement )
   end      
end
elseif callingPhoneNumber == 105 then
if startingCall then
   outputChatBox(\"105 Operátor [TELEFONBA]: Itt a Tűzoltóság! Kérjük mondja el, hogy hol van.\", callingElement)
   exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement, \"callprogress\", 1, false)
else
   if (callprogress==1) then -- Requesting the location
      exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement, \"call.location\", message, false)
      exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement, \"callprogress\", 2, false)
      outputChatBox(\"105 Operátor [TELEFONBA]: Kérjük mondja el, hogy mi történt\", callingElement)
   elseif (callprogress==2) then -- Requesting the situation
      outputChatBox(\"105 Operátor [TELEFONBA]: Köszönjük! Az Egységek hamarosan kiérnek önhöz!.\", callingElement)         
      local location = getElementData(callingElement, \"call.location\")
      local affectedElements = { }
      for key, value in ipairs( getPlayersInTeam( getTeamFromName(\"Hivatalos Onkormányzati Tűzoltóság\") ) ) do
         for _, itemRow in ipairs(exports[\'item-system\']:getItems(value)) do
            local setIn = false
            if (not setIn) and (itemRow[1] == 6 and itemRow[2] > 0) then
               table.insert(affectedElements, value)
               setIn = true
               break
            end
         end
      end   
      for key, value in ipairs( affectedElements ) do
         outputChatBox(\"[RADIO] Bejelentés érkezett a #\" .. outboundPhoneNumber .. \" számról!.\", value, 245, 40, 135)
         outputChatBox(\"[RADIO] Indok: \'\" .. message .. \"\', \", value, 245, 40, 135)
         outputChatBox(\"[RADIO] Helyzet: \'\" .. tostring(location) .. \"\', \", value, 245, 40, 135)
      end
      executeCommandHandler( \"hangup\", callingElement )
   end      
end
elseif callingPhoneNumber == 921 then
if startingCall then
   outputChatBox(\"Operator [Cellphone]: Hex Tow \'n Go. Please state your location.\", callingElement)
   exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement, \"callprogress\", 1, false)
else
   if (callprogress==1) then -- Requesting the location
      exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement, \"call.location\", message)
      exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement, \"callprogress\", 2)
      outputChatBox(\"Operator [Cellphone]: Can you describe the situation please?\", callingElement)
   elseif (callprogress==2) then -- Requesting the situation
      outputChatBox(\"Operator [Cellphone]: Thanks for your call, we\'ve dispatched a unit to your location.\", callingElement)
      local location = getElementData(callingElement, \"call.location\")
      local affectedElements = { }
      for key, value in ipairs( getPlayersInTeam( getTeamFromName(\"Hex Tow \'n Go\") ) ) do
         for _, itemRow in ipairs(exports[\'item-system\']:getItems(value)) do
            local setIn = false
            if (not setIn) and (itemRow[1] == 6 and itemRow[2] > 0) then
               table.insert(affectedElements, value)
               setIn = true
               break
            end
         end
      end   
      for key, value in ipairs( affectedElements ) do
         outputChatBox(\"[RADIO] This is dispatch, We\'ve got an incident report from #\" .. outboundPhoneNumber .. \", Over.\", value, 0, 183, 239)
         outputChatBox(\"[RADIO] Situation: \'\" .. message .. \"\', Over.\", value, 0, 183, 239)
         outputChatBox(\"[RADIO] Location: \'\" .. tostring(location) .. \"\', Out.\", value, 0, 183, 239)
      end
      executeCommandHandler( \"hangup\", callingElement )
   end      
end
elseif callingPhoneNumber == 1501 then
if (publicphone) then
   outputChatBox(\"Computer voice [Cellphone]: This service is not available on this phone.\", callingElement)
else
   outputChatBox(\"Computer voice [Cellphone]: You are now calling with a secret number.\", callingElement)
   mysql:query_free( \"UPDATE `phone_settings` SET `secretnumber`=\'1\' WHERE `phonenumber`=\'\".. mysql:escape_string(tostring(outboundPhoneNumber)) ..\"\'\")
   --exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement,\"cellphone.secret\",1, false)
end
executeCommandHandler( \"hangup\", callingElement )
elseif callingPhoneNumber == 1502 then
if (publicphone) then
   outputChatBox(\"Computer voice [Cellphone]: This service is not available on this phone.\", callingElement)
else
   outputChatBox(\"Computer voice [Cellphone]: You are now calling with a normal number.\", callingElement)
   mysql:query_free( \"UPDATE `phone_settings` SET `secretnumber`=\'0\' WHERE `phonenumber`=\'\".. mysql:escape_string(tostring(outboundPhoneNumber)) ..\"\'\")
   --exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement,\"cellphone.secret\",0, false)
end
executeCommandHandler( \"hangup\", callingElement )
elseif callingPhoneNumber == 8294 then
if startingCall then
   outputChatBox(\"Taxi Operátor [TELEFONBA]: Itt az optic Taxi! Kérjük mondja el, hogy hol van\", callingElement)
   exports[\'anticheat-system\']:changeProtectedElementDataEx(callingElement, \"callprogress\", 1, false)
else
   local founddriver = false
   for key, value in ipairs(exports.pool:getPoolElementsByType(\"player\")) do
      local job = getElementData(value, \"job\")                  
      if (job == 2) then
         local car = getPedOccupiedVehicle(value)
         if car and (getElementModel(car)==438 or getElementModel(car)==420) then
            outputChatBox(\"[Új HÍVÁS] \" .. getPlayerName(callingElement):gsub(\"_\",\" \") ..\" | Tell. Szám:\" .. outboundPhoneNumber .. \" | Helyzet: \" .. message ..\".\" , value, 0, 183, 239)
            founddriver = true
         end
      end
   end
   if founddriver == true then
      outputChatBox(\"Taxi Operátor [TELEFONBA]: Köszönjük a hívását. Kérjük várjon míg a Taxi kiér önhöz.\", callingElement)
   else
      outputChatBox(\"Taxi Operátor [TELEFONBA]: Sajnos nincs szolgálatba 1 Taxis se..\", callingElement)
   end
   executeCommandHandler( \"hangup\", callingElement )
end
 

Nem elérhető Toxic

  • 798
  • #elfújalágyszellő
    • Profil megtekintése
Telefon ( 104 , 105, 107 )
« Válasz #1 Dátum: 2014. December 29. - 13:27:34 »
0 Show voters
[gmod]December 6. óta nem érkezett válasz, zárom.[/gmod]

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal