13.09.2013, 16:44
Hi,
im creating my first gamemode from scratch and i have some experience with C++ but i have a little problem.
I created a random spawn in public OnPlayerSpawn like this:
And everything works etc etc..
but the problem is, that when you press "Spawn" in skin selector, it first places the player in the default place where it was placed by default while selecting the class.
Its not really annoying, but i would like to avoid it, and teleport directly to the random spawn.
Thanks in advance.
im creating my first gamemode from scratch and i have some experience with C++ but i have a little problem.
I created a random spawn in public OnPlayerSpawn like this:
Код:
public OnPlayerSpawn(playerid) { new randomSpawn = random(4); //0 = SF, 1 = LV, 2 = LV2, 3 = LS switch(randomSpawn) { case 0: //SF { SetPlayerPos(playerid, -1984.2036,139.0691,27.6875); SetPlayerFacingAngle(playerid, 85.8636); SetCameraBehindPlayer(playerid); } //And all the rest of spawn coordinates go there..no need to list them all i think } return 1; }
but the problem is, that when you press "Spawn" in skin selector, it first places the player in the default place where it was placed by default while selecting the class.
Its not really annoying, but i would like to avoid it, and teleport directly to the random spawn.
Thanks in advance.