Jump to content

spawn messed up


liamknight24

Recommended Posts

hi my spawn script was working fine when i was using the logingui spawn but it kept on spawning me as cj as the saveskin scipt would not work and now i keep on spawning in blueberry acres and i dont understand why(i suck) here is the script:

function spawnPlayer ( player, 1480, -1740, 15, [ rotation = 0, interior = 0, dimension = 0, team theTeam = nil ] )

setCameraTarget(player, player)

end

function spawnWasted(player)

repeat until spawnPlayer ( player, -2655.02, 625.30, 14.45, 180, )

fadeCamera(player, true)

setCameraTarget(player, player)

takePlayerMoney ( player, 150 )

end

)

addEventHandler("onPlayerWasted", root,

function()

setTimer(spawnWasted, 1800, 1, source)

end

)

function onPlayerQuit ( )

local playeraccount = getPlayerAccount ( source )

if ( playeraccount ) then

local playerSkin = getElementModel ( source )

setAccountData ( playeraccount, "Skin", Skin )

end

end

function loadskin ( )

local playeraccount = getPlayerAccount ( source )

if ( playeraccount ) then

local playerSkin = getAccountData ( playeraccount, "Skin" )

if ( playerSkin ) then

setElementModel ( source, playerSkin )

addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit )

addEventHandler ( "onPlayerLogin", getRootElement ( ), loadskin )

addEventHandler ( "onPlayerLogin", getRootElement ( ), spawnplayer )

please help me with this i have only been scripting for like 2 days or so.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...