Sorry for strcmp! you can change it according to your needs if you want ZCMD and sscanf2 used!
pawn Код:
if(strcmp(cmd, "/addpos", true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid))
{
new Float:X,Float:Y,Float:Z,Float:A,File:pos;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,A);
pos = fopen("footpos's.txt", io_append);
format(string, 256, "ON Foot Pos == %f, %f, %f, %f\n", X, Y, Z, A);
fwrite(pos, string);
fclose(pos);
format(string, sizeof(string), "Location Saved in the file by : %f, %f, %f", X,Y,Z);
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
}
1. Use this to get the position of the coordinates and they get saved in a file called "footpos.txt"
2. XYZ in AddPlayerClass is the default spawn point for that skin which you choose! You dont need any other function after that but yes! For teams we do make other functions like i have SpawnPlayer(playerid) i use it over OnPlayerSpawn() callback.