- Initiateur de la discussion
M
Membre supprimé 92858
Anonyme
Bonjour / Bonsoir à toutes et à tous !
Excusez-moi de vous déranger, cependant je viens chercher de l'aide ici x)
Voyez-vous j'ai un script (Que Atlantis m'a gentiment donné ^^) et j'ai un problème avec le model error qui apparait.
Le script:Excusez-moi de vous déranger, cependant je viens chercher de l'aide ici x)
Voyez-vous j'ai un script (Que Atlantis m'a gentiment donné ^^) et j'ai un problème avec le model error qui apparait.
Code:
AddCSLuaFile("shared.lua")
AddCSLuaFile("cl_init.lua")
include("cl_init.lua")
function ENT:Initialize() self:SetModel("") self:SetMoveType(MOVETYPE_NOCLIP) self:SetSolid(SOLID_NONE)
end
function ENT:Think() if not IsValid(self.ply) then -- just in case self:Remove() return end self:SetPos(self.ply:GetPos() + Vector(0, 0, 75))
end
util.AddNetworkString("DarkRP_ToggleChat")
local function ToggleChatIndicator(len, ply) if not IsValid(ply.ChatIndicator) then ply.ChatIndicator = ents.Create("chatindicator") ply.ChatIndicator.ply = ply -- plyception ply.ChatIndicator:SetPos(ply:GetPos() + Vector(0, 0, 85)) ply.ChatIndicator:Spawn() ply.ChatIndicator:Activate() if(ply:Team()==TEAM_CHIEF or ply:Team()==TEAM_POLICE_GHOST or ply:Team()==TEAM_REB_PC or ply:Team()==TEAM_POLICEC or ply:Team()==TEAM_POLICE_RCT or ply:Team()==TEAM_POLICE_05 or ply:Team()==TEAM_POLICE_04 or ply:Team()==TEAM_POLICE_03 or ply:Team()==TEAM_POLICE_02 or ply:Team()==TEAM_POLICE_01 or ply:Team()==TEAM_GUNPC ) then ply:EmitSound("npc/overwatch/radiovoice/on3.wav"); elseif(ply:Team()==TEAM_OTA or ply:Team()==TEAM_OTA_KING or ply:Team()==TEAM_OTA_PRISON) then ply:EmitSound("npc/overwatch/radiovoice/on3.wav"); end else ply.ChatIndicator:Remove() end
end
net.Receive("DarkRP_ToggleChat", ToggleChatIndicator)
util.AddNetworkString("DarkRP_ToggleChat2")
local function ToggleChatIndicator2(len, ply) if not IsValid(ply.ChatIndicator) then ply.ChatIndicator = ents.Create("chatindicator") ply.ChatIndicator.ply = ply -- plyception ply.ChatIndicator:SetPos(ply:GetPos() + Vector(0, 0, 85)) ply.ChatIndicator:Spawn() ply.ChatIndicator:Activate() else if(ply:Team()==TEAM_CHIEF or ply:Team()==TEAM_POLICE_GHOST or ply:Team()==TEAM_REB_PC or ply:Team()==TEAM_POLICEC or ply:Team()==TEAM_POLICE_RCT or ply:Team()==TEAM_POLICE_05 or ply:Team()==TEAM_POLICE_04 or ply:Team()==TEAM_POLICE_03 or ply:Team()==TEAM_POLICE_02 or ply:Team()==TEAM_POLICE_01 or ply:Team()==TEAM_GUNPC ) then ply:EmitSound("npc/overwatch/radiovoice/off2.wav"); elseif(ply:Team()==TEAM_OTA or ply:Team()==TEAM_OTA_KING or ply:Team()==TEAM_OTA_PRISON) then ply:EmitSound("npc/overwatch/radiovoice/off2.wav"); end ply.ChatIndicator:Remove() end
end
net.Receive("DarkRP_ToggleChat2", ToggleChatIndicator2)
local function RemoveChatIndicator(ply) if IsValid(ply.ChatIndicator) then ply.ChatIndicator:Remove() end
end
hook.Add("PlayerDisconnected", "Disc_RemoveIndicator", RemoveChatIndicator)
hook.Add("KeyPress", "Move_RemoveIndicator", RemoveChatIndicator) -- so people can't abuse the command.
hook.Add("PlayerDeath", "Die_RemoveIndicator", RemoveChatIndicator)
Code:
self:SetModel("")
Je vous remercie de votre futur aide x)
Bonne journée / soirée à toutes et à tous !
Cordialement, AntoGhost