Code:
-- Set models for ranks here!
ghostmodel = "models/eliteghostcp.mdl"
ofcmodel = "models/policetrench.mdl"
epumodel = "models/leet_police2.mdl"
dvlmodel = "models/eliteshockcp.mdl"
cmdmodel = "models/dpfilms/metropolice/police_fragger.mdl"
secmodel = "models/dpfilms/metropolice/tribal_police.mdl"
eowmodel = "models/combine_super_soldier.mdl"
function Schema:GetPlayerDefaultModel(player)
local faction = player:GetFaction();
if (self:IsCombineFaction(faction)) then
if (self:IsPlayerCombineRank(player, "GHOST")) then
return ghostmodel;
elseif (self:IsPlayerCombineRank(player, "OfC")) then
return ofcmodel;
elseif (self:IsPlayerCombineRank(player, "DvL")) then
return dvlmodel;
elseif (self:IsPlayerCombineRank(player, "CmD")) then
return cmdmodel;
elseif (self:IsPlayerCombineRank(player, "SeC")) then
return secmodel;
end;
end;
end;
function Schema:PlayerNameChanged(player, previousName, newName)
if (self:PlayerIsCombine(player)) then
local faction = player:GetFaction();
if (faction == FACTION_OTA) then
if (!self:IsStringCombineRank(previousName, "OWS") and self:IsStringCombineRank(newName, "OWS")) then
Clockwork.class:Set(player, CLASS_OWS);
elseif (!self:IsStringCombineRank(previousName, "EOW") and self:IsStringCombineRank(newName, "EOW")) then
Clockwork.class:Set(player, CLASS_EOW);
end;
elseif (faction == FACTION_MPF) then
if (!self:IsStringCombineRank(previousName, "SCN") and self:IsStringCombineRank(newName, "SCN")) then
Clockwork.class:Set(player, CLASS_MPS, true);
self:MakePlayerScanner(player, true);
elseif (!self:IsStringCombineRank(previousName, "RCT") and self:IsStringCombineRank(newName, "RCT")) then
Clockwork.class:Set(player, CLASS_MPR);
elseif (!self:IsStringCombineRank(previousName, "EpU") and self:IsStringCombineRank(newName, "EpU")) then
Clockwork.class:Set(player, CLASS_EMP);
elseif (!self:IsStringCombineRank(previousName, "OfC") and self:IsStringCombineRank(newName, "OfC")) then
player:SetModel(ofcmodel);
elseif (!self:IsStringCombineRank(previousName, "DvL") and self:IsStringCombineRank(newName, "DvL")) then
player:SetModel(dvlmodel);
elseif (!self:IsStringCombineRank(previousName, "CmD") and self:IsStringCombineRank(newName, "CmD")) then
player:SetModel(cmdmodel);
elseif (!self:IsStringCombineRank(previousName, "SeC") and self:IsStringCombineRank(newName, "SeC")) then
player:SetModel(secmodel);
elseif (!self:IsStringCombineRank(newName, "RCT")) then
if (player:Team() != CLASS_MPU) then
Clockwork.class:Set(player, CLASS_MPU);
end;
end;
if (!self:IsStringCombineRank(previousName, "GHOST") and self:IsStringCombineRank(newName, "GHOST")) then
player:SetModel(ghostmodel);
end;
end;
end;
end;
function Schema:PlayerAdjustCharacterScreenInfo(player, character, info)
if (character.data["permakilled"]) then
info.details = "This character is permanently killed.";
end;
if (info.faction == FACTION_OTA) then
if (self:IsStringCombineRank(info.name, "EOW")) then
info.model = eowmodel;
end;
elseif (self:IsCombineFaction(info.faction)) then
if (self:IsStringCombineRank(info.name, "SCN")) then
if (self:IsStringCombineRank(info.name, "SYNTH")) then
info.model = "models/shield_scanner.mdl";
else
info.model = "models/combine_scanner.mdl";
end;
elseif (self:IsStringCombineRank(info.name, "SeC")) then
info.model = secmodel;
elseif (self:IsStringCombineRank(info.name, "CmD")) then
info.model = cmdmodel;
elseif (self:IsStringCombineRank(info.name, "DvL")) then
info.model = dvlmodel;
elseif (self:IsStringCombineRank(info.name, "EpU")) then
info.model = epumodel;
elseif (self:IsStringCombineRank(info.name, "OfC")) then
info.model = ofcmodel;
end;
if (self:IsStringCombineRank(info.name, "GHOST")) then
info.model = ghostmodel;
end;
end;
if (character.data["customclass"]) then
info.customClass = character.data["customclass"];
end;
end;