<"script />
addEventHandler("onPlayerJoin", getRootElement(),
function ()
local x = 1959.55
local y = -1714.46
local z = 10
local pname = GetPlayerName( source )
spawnPlayer(source, x, y, z)
fadeCamera(source, true)
setCameraTarget(source, source)
outputChatBox("Welcome to Gaalaxy Stunting", source)
outputChatBox ( pname.. "++ Has joined Galaxy Stunting!" )
setElementData( source, "deaths", 0 );
setElementData( source, "kills", 0 );
end
)
-- Events
addEventHandler("onPlayerWasted",getRootElement(),
function (totalAmmo, killer, killerWeapon, bodypart)
local pname = getPlayerName( source )
local pname2 = getPlayerName( killer )
outputChatBox(pname2.. " has Killed " ..pname)
setElementData( source, "deaths", getElementData( source, "deaths" ) + 1 );
setElementData( killer, "kills", getElementData( killer, "kills" ) + 1 );
end
)
-- Commands
addCommandHandler( "stats",
function( plr )
outputChatBox( "Your current stats: " .. getElementData( plr, "kills" ) .. "/" .. getElementData( plr, "deaths" ), plr );
outputChatBox( "Kills: " .. getElementData( plr, "kills" ), plr );
outputChatBox( "Deaths: ".. getElementData( plr, "deaths" ), plr );
end
)
addCommandHandler ( "killme",
function ( plr )
local pname = GetPlayerName( plr )
SetPlayerHealth( plr, 0 )
outputChatBox( pname.. "Has Killed Himself")
end
)
ok this is my whole lua script. i am using the MTA Script Editor. so when i start the server and it loads the script but it doesn't because none of this is working and its loading vehicles and other stuff i never added D=
can someone please help me