You're clearly doing something wrong as to why it isn't working. Check your script again
AreaTransitionXYZ(0,302.8304138,-71.37110138,5)
PlayerSetHealth(PedGetMaxHealth(gPlayer))
Player2 = PedCreateXYZ(31, 303.0464783, -73.48997498, 5)
PedSetAITree(Player2, "/Global/PlayerAI", "Act/AI/PlayerAI.act")
PedSwapModel(Player2, "player")
PedSetStatsType(Player2, "STAT_PLAYER")
PedSetControllerID(Player2,2)
PedSetActionTree(Player2, "/Global/Player", "Act/Anim/Player.act")
PedRecruitAlly(gPlayer, Player2)
PedSetInfiniteSprint(Player2,true)
PedSetFaction(Player2, 13)
--Not Needed
AreaTransitionXYZ(0,302.8304138+1,-71.37110138+1,5+1)
PlayerSetHealth(PedGetMaxHealth(gPlayer))
Player1 = PedCreateXYZ(29, 303.0464783, -73.48997498, 5)
PedSetAITree(Player1, "/Global/PlayerAI", "Act/AI/PlayerAI.act")
PedSwapModel(Player1, "player")
PedSetStatsType(Player1, "STAT_PLAYER")
PedSetControllerID(Player1,1)
PedSetActionTree(Player1, "/Global/Player", "Act/Anim/Player.act")
PedRecruitAlly(gPlayer, Player1)
PedSetInfiniteSprint(Player1,true)
PedSetFaction(Player1, 13)
Fixed*
AreaTransitionXYZ(0,302.8304138,-71.37110138,5)
PlayerSetHealth(PedGetMaxHealth(gPlayer)) Don't use this Player two is not Gplayer -_- Fixed* PedSetHealth(Player2,1000)
Player2 = PedCreateXYZ(31, 303.0464783, -73.48997498, 5)
Set the AreaTransitionXYZ after the ped is spawned
AreaTransitionXYZ(0,302.8304138+1,-71.37110138+1,5+1)
PedSetAITree(Player2, "/Global/PlayerAI", "Act/AI/PlayerAI.act")
PedSwapModel(Player2, "player")
PedSetStatsType(Player2, "STAT_PLAYER")
PedSetControllerID(Player2,2)
PedSetActionTree(Player2, "/Global/Player", "Act/Anim/Player.act")
PedRecruitAlly(gPlayer, Player2)
PedSetInfiniteSprint(Player2,true)
PedSetFaction(Player2, 13)
This is the code I gave you it should've worked before it set's Player 1 to have the players AI and Player 2 to have the players AI. Try spawning the player normally without all the code, since Player 1 automatically has it's default style and AI loaded their is no need to add Player 1's code to the script.