new Float:PosX[MAX_PLAYERS],
Float:PosY[MAX_PLAYERS],
Float:PosZ[MAX_PLAYERS],
Float:PosA[MAX_PLAYERS],
Float:Interior[MAX_PLAYERS],
Float:VW[MAX_PLAYERS];
stock getName(playerid)
{
new Nome[MAX_PLAYER_NAME]; GetPlayerName(playerid, Nome, MAX_PLAYER_NAME); return Nome;
}
stock Spawn(playerid)
{
static Arquivo[31]; format(Arquivo, sizeof(Arquivo), "Spawn/%s.sav", getName(playerid)); return Arquivo;
}
stock SalvarSpawn(playerid)
{
GetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);
GetPlayerFacingAngle(playerid, PosA[playerid]);
Interior[playerid] = GetPlayerInterior(playerid);
VW[playerid] = GetPlayerVirtualWorld(playerid);
DOF2_SetFloat(Spawn(playerid), "CoordenadaX", PosX[playerid]);
DOF2_SetFloat(Spawn(playerid), "CoordenadaY", PosY[playerid]);
DOF2_SetFloat(Spawn(playerid), "CoordenadaZ", PosZ[playerid]);
DOF2_SetFloat(Spawn(playerid), "FacingAngle", PosA[playerid]);
DOF2_SetFloat(Spawn(playerid), "Interior", Interior[playerid]);
DOF2_SetFloat(Spawn(playerid), "VirtualWorld", VW[playerid]);
DOF2_SaveFile();
return 1;
}
stock CarregarSpawn(playerid)
{
PosX[playerid] = DOF2_GetFloat(Spawn(playerid), "CoordenadaX");
PosY[playerid] = DOF2_GetFloat(Spawn(playerid), "CoordenadaY");
PosZ[playerid] = DOF2_GetFloat(Spawn(playerid), "CoordenadaZ");
PosA[playerid] = DOF2_GetFloat(Spawn(playerid), "FacingAngle");
Interior[playerid] = DOF2_GetFloat(Spawn(playerid), "Interior");
VW[playerid] = DOF2_GetFloat(Spawn(playerid), "VirtualWorld");
if(Interior[playerid] > 0)
return SetPlayerInterior(playerid, Interior[playerid]);
if(VW[playerid] > 0)
return SetPlayerVirtualWorld(playerid, VW[playerid]);
SetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);
SetPlayerFacingAngle(playerid, PosA[playerid]);
return 1;
}
|
Precisa mesmo criar uma include somente para esta funзгo ? .-.
Use DOF2 e salva no arquivo do player mesmo amigo, se quiser ajuda de como fazer ... |
|
se vocк estб criando uma include somente para esta funзгo, quando terminar seu Gamemode, se estiver fazendo algum, ele terб 250 includes,
se fizer o code organizado no prуprio .pwn fica mais rбpido tanto pra mecher nele, quanto para compilar, |
|
Ta loko mais vocк й insistente mesmo ein kkk.
mais prefiro fazer em include. |