Szerző Téma: Frakció Chat  (Megtekintve 521 alkalommal)

Frakció Chat
« Dátum: 2015. Augusztus 01. - 23:53:08 »
0 Show voters
Sziasztok! Már mindenhol kerestem \"frakció chatet\" RP szerverre de nem találtam még egy alapot sem.
Esetleg valaki tudna küldeni egy teljesen alap frakció chat scriptet?
Előre is köszönöm. :thumbsup:

Nem elérhető Toxic

  • 798
  • #elfújalágyszellő
    • Profil megtekintése
Frakció Chat
« Válasz #1 Dátum: 2015. Augusztus 02. - 13:07:32 »
0 Show voters
Gondolom Zero modot használsz.
Szerver oldal:
 
function factionOOC(thePlayer, commandName, ...)
local logged = getElementData(thePlayer, \"loggedin\")
if (logged==1) then
if not (...) then
   outputChatBox(\"Használd: /\" .. commandName .. \" [üzenet]\", thePlayer, 255, 194, 14)
else
   local theTeam = getPlayerTeam(thePlayer)
   local theTeamName = getTeamName(theTeam)
   local playerName = getPlayerName(thePlayer)
   local playerFaction = getElementData(thePlayer, \"faction\")
   if not(theTeam) or (theTeamName==\"Citizen\") then
      outputChatBox(\"Nem vagy frakcióban.\", thePlayer)
   else
      local message = table.concat({...}, \" \")
      if (togState[playerFaction]) == true then
         return
      end
      for index, arrayPlayer in ipairs( getElementsByType( \"player\" ) ) do
         if isElement( arrayPlayer ) then
            if getElementData( arrayPlayer, \"bigearsfaction\" ) == theTeam then
               outputChatBox(\"((\" .. theTeamName .. \")) \" .. playerName .. \": \" .. message, arrayPlayer, 3, 157, 157)
            elseif getPlayerTeam( arrayPlayer ) == theTeam and getElementData(thePlayer, \"loggedin\") == 1 then
               outputChatBox(\"((OOC Frakció Chat)) \" .. playerName .. \": \" .. message, arrayPlayer, 3, 237, 237)
            end
         end
      end
   end
end
end
end
addCommandHandler(\"f\", factionOOC, false, false)

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal