- Initiateur de la discussion
LOUISLO7
Geek
- Messages
- 67
- Score réaction
- 2
- Points
- 65
Salut
J'ai trouvé le même script sur le MilitaryRp de TEAM*RE*H
J'ai trouvé le même script sur le MilitaryRp de TEAM*RE*H
-----------------------------------------------------
timer.Simple(1, function()
SetGlobalInt("EventEnabled",1)
SetGlobalString("EventName", nil)
end)
if CLIENT then
local ply = LocalPlayer();
surface.CreateFont("EventFont",{font = "Aero Matics Display",size = 25,weight = 400,antialias = true,additive = false, outline = 0, blursize = 0})
surface.CreateFont("EventFont2",{font = "Sansation",size = 30,weight = 400,antialias = true,additive = false,shadow = 0, outline = 0, blursize = 0})
surface.CreateFont("EventFont3",{font = "Champagne & Limousines Bold",size = 24,weight = 400,antialias = true,additive = false, outline = 0, blursize = 0})
surface.CreateFont("EventFont4",{font = "Aero Matics Display",size = 30,weight = 400,antialias = true,additive = false, outline = 0, blursize = 0})
function PrintInChat(String, Color)
chat.AddText(
Color, String)
end
net.Receive("Class_Menu_chattc_06", function()
local string = net.ReadString()
local color = net.ReadTable()
PrintInChat(string, Color(color.r, color.g, color.b))
end)
concommand.Add("eventstart", function(ply,c,args)
print("Event Starter")
if not ply:IsUserGroup("superadmin") then
plyrintMessage(3, "Tu dois être superadmin pour lancer un Event !")
return
end
Derma_StringRequest("Start Event", "Nom de L'event:", "", function(a)
local EventName = tostring(a);
net.Start("StartEvent")
net.WriteString(EventName)
net.SendToServer()
net.Start("Class_Menu_chatts_06")
local color = {}
color.r = 0
color.g = 255
color.b = 255
net.WriteString("====================================")
net.WriteTable(color)
net.SendToServer()
net.Start("Class_Menu_chatts_06")
local color = {}
color.r = 255
color.g = 255
color.b = 0
net.WriteString(ply:Nick().. " a commencé L'event : "..EventName)
net.WriteTable(color)
net.SendToServer()
net.Start("Class_Menu_chatts_06")
local color = {}
color.r = 0
color.g = 255
color.b = 255
net.WriteString("====================================")
net.WriteTable(color)
net.SendToServer()
end)
end)
hook.Add("HUDPaint","EventHud",function()
if(GetGlobalInt("EventEnabled",1) == 2) and GetGlobalString("EventName") != nil then
surface.SetDrawColor( 0, 0, 255, 230)
surface.DrawRect(ScrW()/2-128,16+10,256+20,25)
surface.SetDrawColor( 0, 0, 0, 230)
surface.DrawRect(ScrW()/2-128,26*2-1,256+20,25)
surface.SetDrawColor( 0, 0, 255, 230)
surface.DrawOutlinedRect(ScrW()/2-128,16+10,256+20,50)
draw.SimpleText( "Event En Cours","EventFont",ScrW()/2+10,26,Color(255,255,255),TEXT_ALIGN_CENTER)
draw.SimpleText(GetGlobalString("EventName") or "???","EventFont",ScrW()/2+10,58-10,Color(30,0,255),TEXT_ALIGN_CENTER)
end
end)
net.Receive("PlaySoundGlobally2",function()
surface.PlaySound("music/stingers/hl1_stinger_song7.mp3")
end)
end
timer.Simple(1, function()
SetGlobalInt("EventEnabled",1)
SetGlobalString("EventName", nil)
end)
if CLIENT then
local ply = LocalPlayer();
surface.CreateFont("EventFont",{font = "Aero Matics Display",size = 25,weight = 400,antialias = true,additive = false, outline = 0, blursize = 0})
surface.CreateFont("EventFont2",{font = "Sansation",size = 30,weight = 400,antialias = true,additive = false,shadow = 0, outline = 0, blursize = 0})
surface.CreateFont("EventFont3",{font = "Champagne & Limousines Bold",size = 24,weight = 400,antialias = true,additive = false, outline = 0, blursize = 0})
surface.CreateFont("EventFont4",{font = "Aero Matics Display",size = 30,weight = 400,antialias = true,additive = false, outline = 0, blursize = 0})
function PrintInChat(String, Color)
chat.AddText(
Color, String)
end
net.Receive("Class_Menu_chattc_06", function()
local string = net.ReadString()
local color = net.ReadTable()
PrintInChat(string, Color(color.r, color.g, color.b))
end)
concommand.Add("eventstart", function(ply,c,args)
print("Event Starter")
if not ply:IsUserGroup("superadmin") then
plyrintMessage(3, "Tu dois être superadmin pour lancer un Event !")
return
end
Derma_StringRequest("Start Event", "Nom de L'event:", "", function(a)
local EventName = tostring(a);
net.Start("StartEvent")
net.WriteString(EventName)
net.SendToServer()
net.Start("Class_Menu_chatts_06")
local color = {}
color.r = 0
color.g = 255
color.b = 255
net.WriteString("====================================")
net.WriteTable(color)
net.SendToServer()
net.Start("Class_Menu_chatts_06")
local color = {}
color.r = 255
color.g = 255
color.b = 0
net.WriteString(ply:Nick().. " a commencé L'event : "..EventName)
net.WriteTable(color)
net.SendToServer()
net.Start("Class_Menu_chatts_06")
local color = {}
color.r = 0
color.g = 255
color.b = 255
net.WriteString("====================================")
net.WriteTable(color)
net.SendToServer()
end)
end)
hook.Add("HUDPaint","EventHud",function()
if(GetGlobalInt("EventEnabled",1) == 2) and GetGlobalString("EventName") != nil then
surface.SetDrawColor( 0, 0, 255, 230)
surface.DrawRect(ScrW()/2-128,16+10,256+20,25)
surface.SetDrawColor( 0, 0, 0, 230)
surface.DrawRect(ScrW()/2-128,26*2-1,256+20,25)
surface.SetDrawColor( 0, 0, 255, 230)
surface.DrawOutlinedRect(ScrW()/2-128,16+10,256+20,50)
draw.SimpleText( "Event En Cours","EventFont",ScrW()/2+10,26,Color(255,255,255),TEXT_ALIGN_CENTER)
draw.SimpleText(GetGlobalString("EventName") or "???","EventFont",ScrW()/2+10,58-10,Color(30,0,255),TEXT_ALIGN_CENTER)
end
end)
net.Receive("PlaySoundGlobally2",function()
surface.PlaySound("music/stingers/hl1_stinger_song7.mp3")
end)
end
-> Sauf que j'ai un problème
Event Starter
[ERROR] lua/autorun/client/cl_event.lua:50: Calling net.Start with unpooled message name! [http://goo.gl/qcx0y]
1. Start - [C]:-1
2. fnEnter - lua/autorun/client/cl_event.lua:50
3. DoClick - lua/derma/derma_utils.lua:223
4. unknown - lua/vgui/dlabel.lua:232
[ERROR] lua/autorun/client/cl_event.lua:50: Calling net.Start with unpooled message name! [http://goo.gl/qcx0y]
1. Start - [C]:-1
2. fnEnter - lua/autorun/client/cl_event.lua:50
3. DoClick - lua/derma/derma_utils.lua:223
4. unknown - lua/vgui/dlabel.lua:232
On peut m'aider s'il vous plaît ?