To add spawns? It's simple.
pawn Код:
1st Step :
Go in a server, then use /save to save the location where the player will spawn.
2nd Step :
Open "Documents / GTA SA User Files / SAMP / savedpositions.txt"
3rd Step :
You should see a code with this format :
AddPlayerClass( 0, 999.0, 888.0, 777.0, 666.0, 0, 0, 0, 0, 0, 0 );
// Arguments : skinID, Float: spawnX, Float: spawnY, Float: spawnZ, Float: spawnAngle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3.
4th Step :
Go to your script, then press CTRL + F.
5th Step :
Try to find "public OnGameModeInit"
6th Step :
Put the AddPlayerClass code below the OnGameModeInit thing. It will looks like below :
public OnGameModeInit( )
{
AddPlayerClass( 0, 999.0, 888.0, 777.0, 666.0, 0, 0, 0, 0, 0, 0 );
return 1;
}
Success, the player class was added, it's really simple and quick.
Then, to create camera position for the class selection :
pawn Код:
1st Step :
Go in game, then type /rs, it will save your position. Save the location where you want where the camera will be and where the player is located.
2nd Step :
Open "Documents / GTA SA User Files / SAMP / rawpositions.txt"
3rd Step :
You will see a coordinates like, "666.00, 777.00, 123.00, 513.00"
// Arguments : Float: X, Float: Y, Float: Z
4th Step :
public OnPlayerRequestClass( playerid, classid )
{
SetPlayerPos( playerid, /* the first 3 positions */ ); // Where the player will be
SetPlayerFacingAngle( playerid, /* the last position */ ); // The player's facing angle
SetPlayerCameraPos( playerid, /* the first 3 camera positions */ ); // Where the camera will be
SetPlayerCameraLookAt( playerid, /* the same location where the player is located */ ); // Where the camera will looks
return 1;
}
Then you made your class selection.
To immediately spawn a player when they finish the registration or login
pawn Код:
forward spawn( playerid );
public spawn( playerid ) { return SpawnPlayer( playerid ), 1; }
CMD:login( playerid, params[ ] )
{
// Your login code
SetTimerEx( "spawn", 100, false, "i", playerid ); // Sets a timer
return 1;
}
CMD:reg( playerid, params[ ] )
{
// Your register code
SetTimerEx( "spawn", 100, false, "i", playerid ); // Sets a timer
return 1;
}
Then, you are done with it.
Also I don't really get what do you mean.
Give me a cookie if it helps
It took some minutes to write