30.05.2015, 22:59
Tenta ai
PHP код:
public OnPlayerSpawn(playerid)
{
new pName[MAX_PLAYER_NAME], File[56];
GetPlayerName(playerid, pName, sizeof(pName));
format(File, sizeof(File), "Posiзхes/%s.txt", pName);
if(DOF2_FileExists(File) && SpawnarInPos[playerid] == 1)
{
pPosX[playerid] = DOF2_GetFloat(File, "PosX");
pPosY[playerid] = DOF2_GetFloat(File, "PosY");
pPosZ[playerid] = DOF2_GetFloat(File, "PosZ");
pPosA[playerid] = DOF2_GetFloat(File, "PosA");
DOF2_GetInt(File, "Interior");
SetPlayerPos(playerid, pPosX[playerid], pPosY[playerid], pPosZ[playerid]);
SetPlayerInterior(playerid, pInterior[playerid]);
SetPlayerFacingAngle(playerid, pPosA[playerid]);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid, -1, "Vocк foi teleportado para o local onde estava antes de sair do jogo pela ъltima vez.");
SpawnarInPos[playerid] = 0;
}
return 1;
}