Well, I am not sure, if on DataBase there are to set coordinates for OnPlayerSpawn because I never used it.
As I post on my above post, this is for random spawn. Just add on the top of your Gamemode
pawn Код:
new Float:RandomSpawns[][] =
{
{1249.7258, -2047.9263, 59.9209, 90.2055}, // Randomspawn
{1241.2084, -2057.6521, 60.0190, 94.9352}, // Randomspawn
{1241.0105, -2052.6873, 59.9975, 2.8144}, // Randomspawn
{718.4906, -1477.3024, 5.4688, 357.9947}, // Randomspawn
{722.3772, -1477.2856, 5.4688, 272.3814} // Randomspawn
};
this. Change the X, Y, Z to the coordinates you want!
After go OnPlayerSpawn and add this. Also, check if you have anything else about random spawns and remove it because they will mix and there will be problem after that.
pawn Код:
public OnPlayerSpawn(playerid)
{
new Random = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
return 1;
}