Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Called just after a player spawns.
- function Schema:PostPlayerSpawn(player, lightSpawn, changeClass, firstSpawn)
- local clothes = player:GetCharacterData("clothes");
- local body = player:GetCharacterData("BodyGroups")
- if (!lightSpawn) then
- player:SetSharedVar("antidepressants", 0);
- Clockwork.datastream:Start(player, "ClearEffects", true);
- player.beingSearched = nil;
- player.searching = nil;
- if (self:PlayerIsCombine(player) or player:GetFaction() == FACTION_ADMIN) then
- if (player:GetFaction() == FACTION_OTA) then
- player:SetMaxHealth(200);
- player:SetMaxArmor(200);
- player:SetHealth(200);
- player:SetArmor(200);
- if Schema:IsPlayerCombineRank(player,"EOW") then
- player:SetMaxHealth(250)
- player:SetMaxArmor(250)
- player:SetHealth(250)
- player:SetArmor(250)
- end
- else
- if player:Team() != CLASS_RACP then
- player:SetMaxArmor(120)
- player:SetArmor(120)
- else
- player:SetMaxArmor(255)
- player:SetArmor(255)
- end
- end
- end;
- if string.find(player:GetName(),"Dmitry Kartograf 'Pahan'") then
- player:SetMaxHealth(120)
- player:SetHealth(120)
- player:SetMaxArmor(180)
- player:SetArmor(180)
- end
- if (self:PlayerIsCombine(player) and player:GetAmmoCount("pistol") == 0) then
- if (!player:HasItemByID("ammo_pistol")) then
- player:GiveItem(Clockwork.item:CreateInstance("ammo_pistol"), true);
- player:GiveItem(Clockwork.item:CreateInstance("ammo_pistol"), true);
- end;
- end;
- end;
- if (self:IsPlayerCombineRank(player, "SCN")) then
- self:MakePlayerScanner(player, true, lightSpawn);
- else
- self:ResetPlayerScanner(player);
- end;
- if (player:GetSharedVar("tied") != 0) then
- self:TiePlayer(player, true);
- end;
- if (clothes) then
- local itemTable = Clockwork.item:FindByID(clothes);
- if (itemTable and player:HasItemByID(itemTable.uniqueID)) then
- self:PlayerWearClothes(player, itemTable);
- else
- player:SetCharacterData("clothes", nil);
- end;
- end;
- --[[
- if body and type(body) == "table" then
- for k, v in pairs( body ) do
- for z, x in pairs( v ) do
- player:SetBodygroup( z, x )
- end
- end
- else
- for k,v in pairs( player:GetBodyGroups() ) do
- player:SetBodygroup( v.id, 0 )
- end
- end
- ]]
- if !Schema:IsCombineFaction(player:GetFaction()) then
- if !player:GetCharacterData("forcefieldaccess") then
- player:SetCharacterData("forcefieldaccess",0)
- player:SetNWInt( "ffaccess", 0 )
- end
- else
- player:SetCharacterData("forcefieldaccess",1)
- player:SetNWInt( "ffaccess", 1 )
- end
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement