їPorquй no me guarda las cordenadas? [Y_INI]
#1

Bueno, ahora el problema es el siguiente, estoy haciendo mi primer gamemode desde 0 con Y_INI, previamente usй DINI pero dicen que este es mбs rбpido, estoy haciendo el cargado de la cuenta cuando encuentro que al desconectarme no me guarda las cordenadas, pero al loguear me cargan

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new string[150], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(string, sizeof(string), "/Usuarios/%s.ini", name);
new INI:File = INI_Open(string);
GetPlayerPos(playerid, pInfo[playerid][PosX], pInfo[playerid][PosY], pInfo[playerid][PosZ]);
INI_WriteFloat( File, "PosicionX", pInfo[playerid][PosX] );
INI_WriteFloat( File, "PosicionY", pInfo[playerid][PosY] );
INI_WriteFloat( File, "PosicionZ", pInfo[playerid][PosZ] );
}
Reply
#2

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new string[150], name[MAX_PLAYER_NAME],Float:pos[3];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(string, sizeof(string), "/Usuarios/%s.ini", name);
new INI:File = INI_Open(string);
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
INI_WriteFloat( File, "PosicionX",pos[0],);
INI_WriteFloat( File, "PosicionY", pos[1]);
INI_WriteFloat( File, "PosicionZ", pos[2]);
}
Fijate asн.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)