Je?eli wiesz jak pisa? skrypty to ja proponuj? zrobi? p?tle dla ka?dego gracza
i sprawdzi? ka?demu graczowi (getPlayerTeam()) czy nale?y do danego teamu no i doda? funkcj? wysy?aj?c? wiadomo??.
Masz Racje Taki Kod ?e bed? bed?c jednostk? ratownicz? pisa? do Policji,Pomoc Drogowej
i te trzy jednostki maj? tak mie? ze sob?
[ Dodano: 2011-11-27, 13:06 ]
I jescze Jeden Problem jak przerobi? Tag System z community ??by da?o si? pisa? na Team Chat bo pisze i pisze mi normalnie za pomoc
local root = getRootElement()
function chatbox(text, msgtype)
local account = getAccountName(getPlayerAccount(source))
local name = getPlayerName(source)
cancelEvent()
if getPlayerTeam(source) == getTeamFromName("Policja") then
outputChatBox("#0000FF [Policjant] " .. name .. " M?wi : " .. text, root, 255, 255, 255, true)
setPedAnimation( source, "GANGS", "prtial_gngtlkG")
setTimer(setPedAnimation,2000,1,source)
end
if getPlayerTeam(source) == getTeamFromName("P.O.M.O.C--S.U.P.O.R.T") then
outputChatBox("#008000 [Suport] " .. name .. " M?wi : " .. text, root, 255, 255, 255, true)
setPedAnimation( source, "GANGS", "prtial_gngtlkG")
setTimer(setPedAnimation,2000,1,source)
end
if getPlayerTeam(source) == getTeamFromName("Obywatele") then
outputChatBox("#008000 [Obywatel] " .. name .. " M?wi : " .. text, root, 255, 255, 255, true)
setPedAnimation( source, "GANGS", "prtial_gngtlkG")
setTimer(setPedAnimation,2000,1,source)
end
if getPlayerTeam(source) == getTeamFromName("Pogotowie") then
outputChatBox("#00BFBF [Lekarz] " .. name .. " M?wi : " .. text, root, 255, 255, 255, true)
setPedAnimation( source, "GANGS", "prtial_gngtlkG")
setTimer(setPedAnimation,2000,1,source)
end
if getPlayerTeam(source) == getTeamFromName("AGENCJA Federalna") then
outputChatBox("#F0FFFF [Obywatel_U.S.A] " .. name .. " M?wi : " .. text, root, 255, 255, 255, true)
setPedAnimation( source, "GANGS", "prtial_gngtlkG")
setTimer(setPedAnimation,2000,1,source)
end
if getPlayerTeam(source) == getTeamFromName("Pomoc Drogowa") then
outputChatBox("#FF8C00 [Mechanik] " .. name .. " M?wi : " .. text, root, 255, 255, 255, true)
setPedAnimation( source, "GANGS", "prtial_gngtlkG")
setTimer(setPedAnimation,2000,1,source)
end
if getPlayerTeam(source) == getTeamFromName("S.W.A.T") then
outputChatBox("#191970 [Anty Terorysta] M?wi : " .. text, root, 255, 255, 255, true)
setPedAnimation( source, "GANGS", "prtial_gngtlkG")
setTimer(setPedAnimation,2000,1,source)
end
if getPlayerTeam(source) == getTeamFromName("Cywile") then
outputChatBox("[Obywatel] " .. name .. " M?wi : " .. text, root, 255, 255, 255, true)
setPedAnimation( source, "GANGS", "prtial_gngtlkG")
setTimer(setPedAnimation,2000,1,source)
end
if getPlayerTeam(source) == getTeamFromName("Administracja") then
outputChatBox("#ff0000[Admin] " .. name .. " M?wi : " .. text, root, 255, 255, 255, true)
setPedAnimation( source, "GANGS", "prtial_gngtlkG")
setTimer(setPedAnimation,2000,1,source)
end
if getPlayerTeam(source) == getTeamFromName("") then
outputChatBox("[Demo] " .. name .. " M?wi : " .. text, root, 255, 255, 255, true)
setPedAnimation( source, "GANGS", "prtial_gngtlkG")
setTimer(setPedAnimation,2000,1,source)
end
end
addEventHandler("onPlayerChat", root, chatbox)
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach