Ayuda Dini Tutorial - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (
https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Ayuda Dini Tutorial (
/showthread.php?tid=118931)
Ayuda Dini Tutorial -
pooooolo - 05.01.2010
Veran no me entro en la cabeza esque quiero agregar el guardado de Pocicion cuando se desconecta el jugador
Que tendria que poner para que se guarde la pos y al poner /Sesion [pass] balla a la pocicion de la Ultima vez?
Re: Ayuda Dini Tutorial -
Miguel - 06.01.2010
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
if(!dini_Exists("Pos.txt"))
{
dini_Create("Pos.txt"); // archivo donde se va a guardar
}
else
{
new
string[10],
Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
format(string, sizeof(string), "%.4f, %.4f, %.4f", Pos[0], Pos[1], Pos[2]);
dini_Set("Pos.txt", "Posicion", string); // posicion lo tienes que cambiar por la linea donde va la pos, y pos.txt por el archivo y su ubicaciуn...
return 1;
}
Re: Ayuda Dini Tutorial -
pooooolo - 06.01.2010
Quote:
Originally Posted by SAWC™
pawn Код:
public OnPlayerDisconnect(playerid, reason) { if(!dini_Exists("Pos.txt")) { dini_Create("Pos.txt"); // archivo donde se va a guardar } else { new string[10], Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); format(string, sizeof(string), "%.4f, %.4f, %.4f", Pos[0], Pos[1], Pos[2]); dini_Set("Pos.txt", "Posicion", string); // posicion lo tienes que cambiar por la linea donde va la pos, y pos.txt por el archivo y su ubicaciуn...
return 1; }
|
Muchas gracias!
Admin Puede CERRAR EL POST PORFAVOR?