Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ function toggleDriveBy()
-- Stolen from wiki --
----------------------
-- we check if local player isn't currently doing a gang driveby
if not isPedDoingGangDriveby ( getLocalPlayer () ) then
if not isPedDoingGangDriveby ( localPlayer ) then
-- if he got driveby mode off, turn it on
setPedWeaponSlot ( getLocalPlayer (), 4 )
setPedDoingGangDriveby ( getLocalPlayer (), true )
setPedWeaponSlot ( localPlayer, 4 )
setPedDoingGangDriveby ( localPlayer, true )
else
-- otherwise, turn it off
setPedWeaponSlot ( getLocalPlayer (), 0 )
setPedDoingGangDriveby ( getLocalPlayer (), false )
setPedWeaponSlot ( localPlayer, 0 )
setPedDoingGangDriveby ( localPlayer, false )
end
----------------------
end
Expand Down
34 changes: 17 additions & 17 deletions [gamemodes]/[stealth]/stealth/noisebar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ function reducesoundlevel ()
guiProgressBarSetProgress ( thesoundbar, barlevel )
-- guiSetVisible ( thesoundbar, true )
smoothfade = setTimer ( smoothreduce, 100, 9 )
setElementData ( getLocalPlayer (), "noiselevel", soundlevel )
setElementData ( localPlayer, "noiselevel", soundlevel )
if soundlevel > 0 then
if blipshowing == 0 then
local isDead = isPedDead(getLocalPlayer ())
local isDead = isPedDead(localPlayer)
if (isDead == false) then
blipshowing = 1
end
Expand Down Expand Up @@ -94,11 +94,11 @@ function damagenoise ( attacker, weapon, bodypart, loss )
if ( bodypart ~= 7 ) and ( bodypart ~= 8 ) then
return
end
local isplayerlimping = getElementData ( getLocalPlayer (), "legdamage" )
local isplayerlimping = getElementData ( localPlayer, "legdamage" )
if isplayerlimping ~= 1 then
if (attacker) then
local attackerteam = getPlayerTeam (attacker)
local yourteam = getPlayerTeam (getLocalPlayer ())
local yourteam = getPlayerTeam (localPlayer)
if attackerteam == yourteam then
if getTeamFriendlyFire ( yourteam ) == false then
--do nothing
Expand All @@ -109,7 +109,7 @@ function damagenoise ( attacker, weapon, bodypart, loss )
--outputChatBox("You've been hit in the leg.", 255, 69, 0)
setPedAnimation ( localPlayer, "ped", bodyPartAnim[bodypart][1], true, true, false )
setTimer ( setPedAnimation, 600, 1, localPlayer )
setElementData ( getLocalPlayer (), "legdamage", 1 )
setElementData ( localPlayer, "legdamage", 1 )
--Blood stuff
local function blood()
local boneX,boneY,boneZ = getPedBonePosition(localPlayer, bodyPartAnim[bodypart][2])
Expand All @@ -126,7 +126,7 @@ function damagenoise ( attacker, weapon, bodypart, loss )
end

function readddamage ()
-- addEventHandler ( "onClientPedDamage", getLocalPlayer (), damagenoise )
-- addEventHandler ( "onClientPedDamage", localPlayer, damagenoise )
end


Expand Down Expand Up @@ -169,10 +169,10 @@ end
--LIMP TIMING

function limpeffect ( source, key, keystate )
if isPedInVehicle (getLocalPlayer ()) then
if isPedInVehicle (localPlayer) then
return
else
islimping = getElementData ( getLocalPlayer (), "legdamage" )
islimping = getElementData ( localPlayer, "legdamage" )
if islimping == 1 then
local makeplayerlimp = setTimer ( limpeffectparttwo , 200, 1, source, key, state )
if lookingthroughcamera ~= 1 then
Expand All @@ -186,10 +186,10 @@ function limpeffect ( source, key, keystate )
end

function limpeffectparttwo ( source, key, keystate )
if isPedInVehicle (getLocalPlayer ()) then
if isPedInVehicle (localPlayer) then
return
else
islimping = getElementData ( getLocalPlayer (), "legdamage" )
islimping = getElementData ( localPlayer, "legdamage" )
if islimping == 1 then
local makeplayerlimp = setTimer ( limpeffect, 500, 1, source, key, state )
if lookingthroughcamera ~= 1 then
Expand All @@ -205,9 +205,9 @@ function limpeffectparttwo ( source, key, keystate )
end

function startalimp ()
local theplayer = getLocalPlayer ()
local theplayer = localPlayer
if (getPedArmor ( theplayer )) == 0 then
setElementData ( getLocalPlayer (), "legdamage", 1 )
setElementData ( localPlayer, "legdamage", 1 )
local makeplayerlimp = setTimer ( limpeffect, 300, 1, source, key, state )
end
end
Expand All @@ -216,7 +216,7 @@ addCommandHandler ( "crippleme", startalimp )


function movementcheck ( source, key, keystate )
if ( isPedDucked ( getLocalPlayer () ) ) == false then
if ( isPedDucked ( localPlayer ) ) == false then
if ( getPedControlState ( "sprint" ) ) then
soundlevel = soundlevel +1
end
Expand Down Expand Up @@ -245,8 +245,8 @@ function hidesoundbar ( theresource )
guiSetVisible ( thesoundbar, false )
end

addEventHandler ( "onClientPlayerWasted", getLocalPlayer (), hidesoundbar )
addEventHandler ( "onClientPlayerDamage", getLocalPlayer (), damagenoise )
addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer (), shootingnoise )
addEventHandler ( "onClientPlayerSpawn", getLocalPlayer (), setupsoundstuff )
addEventHandler ( "onClientPlayerWasted", localPlayer, hidesoundbar )
addEventHandler ( "onClientPlayerDamage", localPlayer, damagenoise )
addEventHandler ( "onClientPlayerWeaponFire", localPlayer, shootingnoise )
addEventHandler ( "onClientPlayerSpawn", localPlayer, setupsoundstuff )
addEventHandler ( "onClientResourceStart", resourceRoot, setuptrigger)
2 changes: 1 addition & 1 deletion [gamemodes]/[stealth]/stealth/stealthmain_client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ end
function cleanup (theresource)
thisone = getThisResource()
if theresource == thisone then
setElementAlpha ( getLocalPlayer (), 255 )
setElementAlpha ( localPlayer, 255 )
timers = getTimers()
for timerKey, timerValue in ipairs(timers) do
killTimer ( timerValue )
Expand Down
2 changes: 1 addition & 1 deletion [web]/performancebrowser/performancebrowser_client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
--
--

me = getLocalPlayer ()
me = localPlayer
local bSupportsStats = getPerformanceStats ~= nil

addEventHandler("onClientResourceStart", resourceRoot,
Expand Down