Dinossauro Posted August 3, 2012 Share 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 ! Link to comment
Jaysds1 Posted August 4, 2012 Share 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 ) Link to comment
Dinossauro Posted August 4, 2012 Author Share Posted August 4, 2012 remains the same, help me! Link to comment
Dinossauro Posted August 4, 2012 Author Share 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! Link to comment
fmj02 Posted August 4, 2012 Share Posted August 4, 2012 You want to spawn player at the same location where he died? Link to comment
Dinossauro Posted August 4, 2012 Author Share 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 ! Link to comment
Castillo Posted August 4, 2012 Share Posted August 4, 2012 You want to save the skin the player had before die and load it when he spawns again? Link to comment
Dinossauro Posted August 4, 2012 Author Share 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! Link to comment
Castillo Posted August 4, 2012 Share Posted August 4, 2012 That must be caused by the "play" game mode, you surely have it started. Link to comment
Dinossauro Posted August 4, 2012 Author Share Posted August 4, 2012 How do I solve the problem? Link to comment
Castillo Posted August 4, 2012 Share Posted August 4, 2012 Stop the resource: "play". 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