Try this, not sure if it will work 100% though so you change it to your script ^-^:
Код:
public OnPlayerRequestClass(playerid, classid)
{
new name[MAX_PLAYER_NAME], file[256];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
if(dini_Int(file, "Skin"))
{
SetPlayerSkin(playerid, dini_Int(file, "Skin"));
SetPlayerPos(playerid, 1962.4459,1343.0460,15.4823);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerSkin(playerid, dini_Int(file, "Skin"));
}
else if (!dini_Int(file, "Skin"))
{
SetPlayerPos(playerid, 1962.4459,1343.0460,15.4823);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
}
return 1;
}
Then do:
Код:
public OnPlayerRequestSpawn(playerid)
{
SetPlayerCameraPos(playerid, 1751.5665,-1945.2590,13.5636);
SetPlayerCameraLookAt(playerid, 1751.5665,-1945.2590,13.5636);
SetSpawnInfo(playerid, PlayerInfo[playerid][pFaction], PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pPos_X], PlayerInfo[playerid][pPos_Y], PlayerInfo[playerid][pPos_Z], 1.0, -1, -1, -1, -1, -1, -1);
SpawnPlayer(playerid);
return 1;
}
So that way if they had a skin saved they have to choose it and after they click spawn it spawns them in the last place they were at, and if they are new they get to choose a skin. I think that is how that works, im kinda new to scripting so im not sure :P. But I coded that by myself the onplayerrequest thing and it works fine and I just used your code on the onplayerrequestspawn ^-^, goodluck!