I'm happy to report we've now developed and installed this plugin. Here's an example:
function onWasted()
if not( isGuestAccount (getPlayerAccount(source)) ) then
local jailtime = getAccountData(getPlayerAccount(source), "Jailtime" ) or 0
local theWeapon = getPedWeapon (source)
local weaponAmmo = getPedTotalAmmo (source)
if tonumber(jailtime) == nil or 0 then
outputChatBox ("1", root)
fadeCamera (source, false)
setTimer (spawnPlayer, 1000, 1, source, 1161.3000488281, -1376.0999755859, 4, 0, getPedSkin (source), 0, 0, getPlayerTeam(source))
setTimer (setElementHealth, 1500, 1, source, 10)
setTimer (setCameraTarget, 1250, 1, source, source)
setTimer (fadeCamera, 2000, 1, source, true)
setTimer (giveWeapon, 2000, 1, source, theWeapon, weaponAmmo, true)
elseif tonumber(jailtime) > 0 then
outputChatBox ("2", root)
fadeCamera (source, false)
setTimer (spawnPlayer, 1000, 1, source, 264.20001220703, 77.599998474121, 1001, 0, getPedSkin (source), 6, 1, getPlayerTeam(source))
setTimer (portjail, 1500, 1)
setTimer (setElementHealth, 1500, 1, source, 10)
setTimer (setCameraTarget, 1250, 1, source, source)
setTimer (fadeCamera, 2000, 1, source, true)
setTimer (giveWeapon, 2000, 1, source, theWeapon, weaponAmmo, true)
end
end
end
addEventHandler ("onPlayerWasted", getRootElement(), onWasted)
As a bonus feature that didn't exist before, Event names are also linked to the wiki. All previous posts have this applied automatically, and all posts going forward.
Note, Wiki links and extended markup will only appear after you've posted the code. Posting code is done normally by pressing the '<>' button in the post editor.
Please report any issues surrounding the syntax highlighting in this topic