Setting spawn after selecting skin - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Setting spawn after selecting skin (
/showthread.php?tid=463730)
Setting spawn after selecting skin -
gandzia - 13.09.2013
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:
Код:
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;
}
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.
Re: Setting spawn after selecting skin -
Vanter - 13.09.2013
get a faster internet connection.
it is samp based, you can't change that.
solution: get a faster internet connection.
Re: Setting spawn after selecting skin -
Sgt.TheDarkness - 13.09.2013
Quote:
Originally Posted by Vanter
get a faster internet connection.
it is samp based, you can't change that.
solution: get a faster internet connection.
|
That made no sense whatsoever....
Firstly, I would assume that your code there is properly indented in your script, if not, then you should think about doing that. Secondly, I don't understand what you mean by "default spawn place", try using the function SpawnPlayer for better results...