Dinossauro Posted August 3, 2012 Posted August 3, 2012 Hello friends, On my server whenever someone died, was born with a different skin, so I put a resource to be born only by the skin of the CJ. Code: function player_Spawn() -- The source of this event is the player that just spawned. setElementModel(source,0) -- set spawned player skin to 0 end addEventHandler ( "onPlayerSpawn", getRootElement(), player_Spawn ) function player_Wasted ( ammo, attacker, weapon, bodypart ) -- The source of this event is the player that died or got killed. local x,y,z = 0,0,0 -- your coords spawnPlayer(source,x,y,z) end addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted ) function spawnonjoin ( ) -- The source of this event is the player who joined. local x,y,z = 0,0,0 -- your coords spawnPlayer(source,x,y,z) end addEventHandler ( "onPlayerJoin", getRootElement(), spawnonjoin ) I put it on the server, and now whenever someone dies is born with the skin on the CJ site, but one second then goes to another location. I took the lease spawn you had before and now he is not born anywhere, it is bug. Help me !
Jaysds1 Posted August 4, 2012 Posted August 4, 2012 try this: function player_Spawn() -- The source of this event is the player that just spawned. if getElementModel(source)~= 0 then --Check if their skin is 0 setElementModel(source,0) -- set spawned player skin to 0 end end addEventHandler ( "onPlayerSpawn", getRootElement(), player_Spawn ) function spawn ( ) -- The source of this event is the player who joined. spawnPlayer(source,0,0,0) end addEventHandler ( "onPlayerJoin", getRootElement(), spawn ) addEventHandler ( "onPlayerWasted", getRootElement(), spawn ) My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
Dinossauro Posted August 4, 2012 Author Posted August 4, 2012 When someone dies, he is born with the skin at the site where the CJ dies, when he goes to the resource site, skin changes. HELP ME!
fmj02 Posted August 4, 2012 Posted August 4, 2012 You want to spawn player at the same location where he died?
Dinossauro Posted August 4, 2012 Author Posted August 4, 2012 No, I want to generate it in different places, but when he dies, it remains with the skin of the CJ, only 2 seconds after it is born in a place and get another skin. HELP ME PLS !
Castillo Posted August 4, 2012 Posted August 4, 2012 You want to save the skin the player had before die and load it when he spawns again? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Dinossauro Posted August 4, 2012 Author Posted August 4, 2012 I want my server, everyone has the Skin of the CJ, when they die, are born with the Skin of the CJ, the CJ skin ever! Because the awards event will be different skins. But here is giving bug, read my post above!
Castillo Posted August 4, 2012 Posted August 4, 2012 That must be caused by the "play" game mode, you surely have it started. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted August 4, 2012 Posted August 4, 2012 Stop the resource: "play". San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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