Mefisto_PL Posted January 2, 2012 Posted January 2, 2012 I would like the script after entering the server gave last used skin and after the death of a player getting a last used skin. :< function joinHandler ( ) spawnPlayer (source, -1969.2669677734, 137.71185302734, 30, 0, math.random (0,288), 0, 0) fadeCamera (source, true) setCameraTarget ( source, source ) end addEventHandler ( "onPlayerJoin" , getRootElement ( ) , joinHandler ) function spawnWasted(player) repeat until spawnPlayer ( player, -2655.02, 625.30, 14.45, 180, 0, 0) fadeCamera(player, true) setCameraTarget(player, player) end addEventHandler("onPlayerWasted", root, function() setTimer(spawnWasted, 1800, 1, source) end ) function greetPlayer ( ) outputChatBox ( "Witaj na Polskim Serwerze Zabawy stworzonym przez Mefisto_PL !" , source, 0, 159, 255 ) end addEventHandler ( "onPlayerLogin", getRootElement(), greetPlayer )
Castillo Posted January 2, 2012 Posted January 2, 2012 function joinHandler ( ) spawnPlayer (source, -1969.2669677734, 137.71185302734, 30, 0, math.random (0,288), 0, 0) fadeCamera (source, true) setCameraTarget ( source, source ) end addEventHandler ( "onPlayerJoin" , getRootElement ( ) , joinHandler ) function spawnWasted(player, skin) repeat until spawnPlayer ( player, -2655.02, 625.30, 14.45, 180, skin, 0) fadeCamera(player, true) setCameraTarget(player, player) end addEventHandler("onPlayerWasted", root, function() setTimer(spawnWasted, 1800, 1, source, getElementModel(player)) end ) function greetPlayer ( ) outputChatBox ( "Witaj na Polskim Serwerze Zabawy stworzonym przez Mefisto_PL !" , source, 0, 159, 255 ) end addEventHandler ( "onPlayerLogin", getRootElement(), greetPlayer ) That should give the skin he had before die, about the skin after leave, you must save the skin somewhere, that could be account data, sql, mysql, xml. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Mefisto_PL Posted January 3, 2012 Author Posted January 3, 2012 On my server it isn't working.. Debugscript 3: "WARNING: AllInOne\spawn.lua:16 bad argument @ 'getElementModel'
JR10 Posted January 3, 2012 Posted January 3, 2012 function joinHandler ( ) spawnPlayer (source, -1969.2669677734, 137.71185302734, 30, 0, math.random (0,288), 0, 0) fadeCamera (source, true) setCameraTarget ( source, source ) end addEventHandler ( "onPlayerJoin" , getRootElement ( ) , joinHandler ) function spawnWasted(player, skin) repeat until spawnPlayer ( player, -2655.02, 625.30, 14.45, 180, skin, 0) fadeCamera(player, true) setCameraTarget(player, player) end addEventHandler("onPlayerWasted", root, function() setTimer(spawnWasted, 1800, 1, source, getElementModel(source)) end ) function greetPlayer ( ) outputChatBox ( "Witaj na Polskim Serwerze Zabawy stworzonym przez Mefisto_PL !" , source, 0, 159, 255 ) end addEventHandler ( "onPlayerLogin", getRootElement(), greetPlayer ) Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
JR10 Posted January 3, 2012 Posted January 3, 2012 You're welcome. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now