I used to be a master at scripting but i havent done this shit for litterally 2-3 years and i have forgot a lot.
How do i make it so when a player dies they spawn at a random location, I already have the coordinates.
pawn Код:
new Float:RandomSpawn[][4] = {
{coordx, coordy, coordz, coorda},
{coordx, coordy, coordz, coorda},
{coordx, coordy, coordz, coorda}
};
public OnPlayerSpawn(playerid)
{
new rands = random(sizeof(RandomSpawn));
SetPlayerPos(playerid, RandomSpawn[rands][0], RandomSpawn[rands][1], RandomSpawn[rands][2]);
SetPlayerFacingAngle(playerid, RandomSpawn[rands][3]);
return 1;
}