Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SURF.MapCompleted1 = SURF.MapCompleters or {}
- SURF.MapCompleted2 = SURF.MapCompleted2 or {}
- SURF.MapCompleted3 = SURF.MapCompleted3 or {}
- hook.Add("PlayerInitialSpawn", "Surf.SetPlayerPoints", function(ply)
- ply:SetNWInt("SurfExperience", ply:GetPData("SurfExperience", 0))
- end)
- hook.Add("PlayerCompletedSurfMap", "Surf.AddEXP", function(ply)
- --Check for all 3 completes
- if table.HasValue(SURF.MapCompleted1, ply:SteamID() ) and table.HasValue(SURF.MapCompleted2, ply:SteamID() ) and table.HasValue(SURF.MapCompleted3, ply:SteamID() ) then return end
- --Completed once? No? Give them shit.
- if not table.HasValue( SURF.MapCompleted1, ply:SteamID() ) then
- ply:AddSurfXP( math.floor(SURF.EndingPoints/1) or 0)
- ply:PS_GivePoints(SURF.EndingPoints*2)
- SURF:SendText( { color_white, "You have been awarded ", SURF['Config']['NotifyColor'], tostring(string.Comma(math.floor(SURF.EndingPoints*2))), color_white, " XP and ", SURF['Config']['NotifyColor'], "$", tostring(string.Comma(SURF.EndingPoints*4)), color_white, " for completing the map. Remember, Its DoubleXP!" }, ply )
- -- // For Double XP weekends Disable the TOP! \\ --
- --ply:AddSurfXP( math.floor(SURF.EndingPoints/1) or 0)
- --ply:PS_GivePoints(SURF.EndingPoints*2)
- --SURF:SendText( { color_white, "You have been awarded ", SURF['Config']['NotifyColor'], tostring(string.Comma(math.floor(SURF.EndingPoints*2))), color_white, " XP and ", SURF['Config']['NotifyColor'], "$", tostring(string.Comma(SURF.EndingPoints*4)), color_white, " for completing the map. Remember, Its DoubleXP!" }, ply )
- table.insert(SURF.MapCompleted1, ply:SteamID())
- end
- --Completed a second time? No? Give them shit.
- if table.HasValue (SURF.MapCompleted1, ply:SteamID() ) then
- if not table.HasValue( SURF.MapCompleted2, ply:SteamID() ) then
- ply:AddSurfXP( math.floor(SURF.EndingPoints/1) or 0)
- ply:PS_GivePoints(SURF.EndingPoints*2)
- SURF:SendText( { color_white, "You have been awarded ", SURF['Config']['NotifyColor'], tostring(string.Comma(math.floor(SURF.EndingPoints*2))), color_white, " XP and ", SURF['Config']['NotifyColor'], "$", tostring(string.Comma(SURF.EndingPoints*4)), color_white, " for completing the map. Remember, Its DoubleXP!" }, ply )
- -- // For Double XP weekends Disable the TOP! \\ --
- --ply:AddSurfXP( math.floor(SURF.EndingPoints/1) or 0)
- --ply:PS_GivePoints(SURF.EndingPoints*2)
- --SURF:SendText( { color_white, "You have been awarded ", SURF['Config']['NotifyColor'], tostring(string.Comma(math.floor(SURF.EndingPoints*2))), color_white, " XP and ", SURF['Config']['NotifyColor'], "$", tostring(string.Comma(SURF.EndingPoints*4)), color_white, " for completing the map. Remember, Its DoubleXP!" }, ply )
- table.insert(SURF.MapCompleted2, ply:SteamID())
- end
- end
- --Completed for the last time? No? Give them shit.
- if table.HasValue (SURF.MapCompleted1, ply:SteamID()) and table.HasValue (SURF.MapCompleted2, ply:SteamID()) then
- if not table.HasValue( SURF.MapCompleted3, ply:SteamID() ) then
- ply:AddSurfXP( math.floor(SURF.EndingPoints/1) or 0)
- ply:PS_GivePoints(SURF.EndingPoints*2)
- SURF:SendText( { color_white, "You have been awarded ", SURF['Config']['NotifyColor'], tostring(string.Comma(math.floor(SURF.EndingPoints*2))), color_white, " XP and ", SURF['Config']['NotifyColor'], "$", tostring(string.Comma(SURF.EndingPoints*4)), color_white, " for completing the map. Remember, Its DoubleXP!" }, ply )
- -- // For Double XP weekends Disable the TOP! \\ --
- --ply:AddSurfXP( math.floor(SURF.EndingPoints/1) or 0)
- --ply:PS_GivePoints(SURF.EndingPoints*2)
- --SURF:SendText( { color_white, "You have been awarded ", SURF['Config']['NotifyColor'], tostring(string.Comma(math.floor(SURF.EndingPoints*2))), color_white, " XP and ", SURF['Config']['NotifyColor'], "$", tostring(string.Comma(SURF.EndingPoints*4)), color_white, " for completing the map. Remember, Its DoubleXP!" }, ply )
- table.insert(SURF.MapCompleted3, ply:SteamID())
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement