MasterTobi Posted November 21, 2008 Posted November 21, 2008 Hey @ all i´m so stupid ^^. i need a code for respawn after dead. how can i help me
robhol Posted November 21, 2008 Posted November 21, 2008 Read the scripting intro first, it will surely come in handy. Then, check out addEventHandler (and some basic info about the event system will also be useful) and the onPlayerWasted event. Then, the spawnPlayer function. Do NOT PM ME for help unless invited. - New MTA Script Editor Scripting help "etiquette": understandable language, relevant code (ALL code if unsure), [Lua] tags, error messages with line numbers. Super simple stuff.
MasterTobi Posted November 21, 2008 Author Posted November 21, 2008 thx now i can respawn the code for another people : function respawn() setTimer( spawnPlayer,--Time, 1, source, --x, --y, --z ) end addEventHandler ( "onPlayerWasted", getRootElement(), respawn )
=FAS=Shigawire Posted November 21, 2008 Posted November 21, 2008 thxnow i can respawn the code for another people : function respawn() setTimer( spawnPlayer,--Time, 1, source, --x, --y, --z ) end addEventHandler ( "onPlayerWasted", getRootElement(), respawn ) code should be function respawn(player, Time) local x,y,z = getElementPosition (player) setTimer( spawnPlayer,Time, 1, player, x, y, z ) end addEventHandler ( "onPlayerWasted", getRootElement(), respawn ) -- will ignore the whole line, not just one word Hosting your MTA:SA server! http://gta-servers.net.
darkdreamingdan Posted November 21, 2008 Posted November 21, 2008 thxnow i can respawn the code for another people : function respawn() setTimer( spawnPlayer,--Time, 1, source, --x, --y, --z ) end addEventHandler ( "onPlayerWasted", getRootElement(), respawn ) code should be function respawn(player, Time) local x,y,z = getElementPosition (player) setTimer( spawnPlayer,Time, 1, player, x, y, z ) end addEventHandler ( "onPlayerWasted", getRootElement(), respawn ) -- will ignore the whole line, not just one word I believe he was aware of that, just using them as placemarkers rather than actual code VCP FOREVER!
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