Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- Extracts from my code, the needed stuff
- --These are me creating functions
- function PointsForTaunt()
- if DEBUG or !GAMEMODE:InRound() then return false end
- if GetConVar("PH_POINTSHOP_POINTS_TAUNT"):GetInt() > 0 then
- return PS and true
- end
- end
- function PH_PlayerInitialSpawn(ply)
- if MapHasLua then
- net.Start( "LoadCurrentMapLua" )
- net.Send( ply )
- end
- end
- -- These are the sections where a boolean error is being made
- --Section 1
- function FirstBlood(attacker,victim)
- if GetConVar("PH_FIRSTBLOOD"):GetInt() < 1 and !GAMEMODE:InRound() then return end
- if !FirstBlooded then
- local firstBloodPoints = GetConVar( "PH_POINTSHOP_FIRSTBLOOD_POINTS"):GetInt()
- FirstBlooded = true
- BroadcastMsg( Color(255,30,0), attacker:Nick().." got First Blood!" )
- BroadcastSound("firstblood.mp3")
- hook.Run("ST_FirstBlood",attacker,victim)
- if PointsForKill() then
- attacker:PS_GivePoints(firstBloodPoints)
- attacker:PS_Notify("First Blood for " .. tostring(firstBloodPoints) .. " extra " .. PS.Config.PointsName .. "!")
- end
- end
- end
- -- Section 2
- if PointsForKill() then
- local pointsForKillAmount = GetConVar("PH_POINTSHOP_KILL_POINTS"):GetInt()
- attacker:PS_GivePoints(pointsForKillAmount)
- attacker:PS_Notify("You got " .. pointsForKillAmount .. " " .. PS.Config.PointsName .. " for killing " .. vict:Name() .. "!")
- end
- -- Section 3
- if (ply.last_point_time <= CurTime()) and (ply:Team() == TEAM_PROPS) and PointsForTaunt() then
- ply:PS_GivePoints(PointsForTauntAmount)
- ply:PS_Notify("You got " .. PointsForTauntAmount .. " " .. PS.Config.PointsName .. " for taunting!")
- end
- hook.Run("ST_Taunt",ply)
- end
- return
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement