Bilal135 Posted February 20, 2015 Share Posted February 20, 2015 Hey, I was scripting a spawner for my clan in my server, got a problem. When player dies, he spawns on the base and then suddenly spawns on grove street or default mta spawners. How can I fix it? function spawnOnDead() local team = getPlayerTeam(source) local sk = getTeamFromName("Street Killers") if team == sk then spawnPlayer(source, joinX, joinY, joinZ) end end addEventHandler("onPlayerWasted", getRootElement(), spawnOnDead) Link to comment
Addlibs Posted February 20, 2015 Share Posted February 20, 2015 You could change position of the player upon onPlayerSpawn, otherwise you'd probably have to edit the currently running gamemode or script which handles respawning Link to comment
Addlibs Posted February 20, 2015 Share Posted February 20, 2015 Simply do /stop play I think he wants others to spawn at default locations too... Disabling 'play' or whatever resource he's using for spawning would make standard players stuck after getting wasted, wouldn't it? Link to comment
xeon17 Posted February 20, 2015 Share Posted February 20, 2015 As i know , he is creating his own spawn system and he have a problem which is caused by the play resource. So i've wrote to stop the play resource, what would fix the problem. Link to comment
Bilal135 Posted February 21, 2015 Author Share Posted February 21, 2015 MrTasty is right, I want others to spawn on default spawn locations, but not for teams. Tried onPlayerSpawn instead of onPlayerWasted, and it works. Thanks. Link to comment
xeon17 Posted February 21, 2015 Share Posted February 21, 2015 Then you'll have to edit the spawnmanager resource. Link to comment
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