SA-MP Forums Archive
[HELP]Spawn Points - 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: [HELP]Spawn Points (/showthread.php?tid=301103)



[HELP]Spawn Points - Tasos_Killer - 03.12.2011

hello, can you tell me how i can make my own spawn point on the map, when i will spawn the player class it will be spawned on the point i added please??


Re: [HELP]Spawn Points - antonio112 - 03.12.2011

Well, all you have to do, is go to the point where you want to spawn a class and do /save. The coordinates will be saved in My Documents - > GTA San Andreas USer File - > SAMP -> savedpositions.txt

Just copy the:
AddPlayerClass line from there and paste it under your OnGameModeInit like:
pawn Код:
public OnGameModeInit()
{
    // People can spawn with either the CJ skin or The Truth skin.
    AddPlayerClass(0, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0);
    AddPlayerClass(1, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0);
    return 1;
}
More info here: https://sampwiki.blast.hk/wiki/AddPlayerClass