problem con guardado de bolsillos :/
#1

Bueno estuve asiendo un sistema de bolsillos y todo funciona a la perfecciуn pero el problema es al guardar y cargar lo que tiene en las manos por ejemplo tiene una pistola con 2 balas y al desconectarse y al volverse a conectar se le ponen 4 osea se suman y nose porque entonces creo que debe ser que el guardado lo puse en OnPlayerDisconnect y creo que por eso se suman pero nose... Alguien me puede ayudar? aquн les dejo el guardado:

Код:
public OnPlayerDisconnect(playerid, reason)
			{
			//save de sistemas
			new INI:File = INI_Open(UserPath(playerid));
		    INI_SetTag(File,"data");
		    INI_WriteInt(File,"bolsillo",PlayerInfo[playerid][pBol][0]);
		    INI_WriteInt(File,"bolsillo1",PlayerInfo[playerid][pBol][1]);
		    INI_WriteInt(File,"bolsillo2",PlayerInfo[playerid][pBol][2]);
		    INI_WriteInt(File,"bolsillo3",PlayerInfo[playerid][pBol][3]);
		    INI_WriteInt(File,"bolsillo4",PlayerInfo[playerid][pBol][4]);
		    INI_WriteInt(File,"bolsillo5",PlayerInfo[playerid][pBol][5]);
		    INI_WriteInt(File,"bolsillo6",PlayerInfo[playerid][pBol][6]);
		    INI_WriteInt(File,"bolsillo7",PlayerInfo[playerid][pBol][7]);
		    INI_WriteInt(File,"Manoizq",PlayerInfo[playerid][pManoIzq]);
		    INI_WriteInt(File,"Espalda",PlayerInfo[playerid][pEspalda]);
		    INI_WriteInt(File,"ManoizqCant",PlayerInfo[playerid][pManoIzqCant]);
		    INI_WriteInt(File,"EspaldaCant",PlayerInfo[playerid][pEspaldaCant]);
		    INI_WriteInt(File,"ManoDer",PlayerInfo[playerid][pManoDer]);
		    INI_WriteInt(File,"ManoDerCant",PlayerInfo[playerid][pManoDerCant]);
		    INI_WriteInt(File,"bolcant",PlayerInfo[playerid][pBolCant][0]);
		    INI_WriteInt(File,"bolcant1",PlayerInfo[playerid][pBolCant][1]);
		    INI_WriteInt(File,"bolcant2",PlayerInfo[playerid][pBolCant][2]);
		    INI_WriteInt(File,"bolcant3",PlayerInfo[playerid][pBolCant][3]);
		    INI_WriteInt(File,"bolcant4",PlayerInfo[playerid][pBolCant][4]);
		    INI_WriteInt(File,"bolcant5",PlayerInfo[playerid][pBolCant][5]);
		    INI_WriteInt(File,"bolcant6",PlayerInfo[playerid][pBolCant][6]);
		    INI_WriteInt(File,"bolcant7",PlayerInfo[playerid][pBolCant][7]);
                    		    INI_Close(File);
Y este es el cargado:

Код:
public CargarInfo_datos(playerid,name[],value[]){
	    INI_Int("bolsillo0",PlayerInfo[playerid][pBol][0]);
	    INI_Int("bolsillo1",PlayerInfo[playerid][pBol][1]);
	    INI_Int("bolsillo2",PlayerInfo[playerid][pBol][2]);
	    INI_Int("bolsillo3",PlayerInfo[playerid][pBol][3]);
	    INI_Int("bolsillo4",PlayerInfo[playerid][pBol][4]);
	    INI_Int("bolsillo5",PlayerInfo[playerid][pBol][5]);
	    INI_Int("bolsillo6",PlayerInfo[playerid][pBol][6]);
	    INI_Int("bolsillo7",PlayerInfo[playerid][pBol][7]);
	    INI_Int("Manoizq",PlayerInfo[playerid][pManoIzq]);
	    INI_Int("Espalda",PlayerInfo[playerid][pEspalda]);
	    INI_Int("ManoizqCant",PlayerInfo[playerid][pManoIzqCant]);
	    INI_Int("EspaldaCant",PlayerInfo[playerid][pEspaldaCant]);
	    INI_Int("ManoDer",PlayerInfo[playerid][pManoDer]);
	    INI_Int("ManoDerCant",PlayerInfo[playerid][pManoDerCant]);
	    INI_Int("bolcant",PlayerInfo[playerid][pBolCant][0]);
	    INI_Int("bolcant1",PlayerInfo[playerid][pBolCant][1]);
	    INI_Int("bolcant2",PlayerInfo[playerid][pBolCant][2]);
	    INI_Int("bolcant3",PlayerInfo[playerid][pBolCant][3]);
	    INI_Int("bolcant4",PlayerInfo[playerid][pBolCant][4]);
	    INI_Int("bolcant5",PlayerInfo[playerid][pBolCant][5]);
	    INI_Int("bolcant6",PlayerInfo[playerid][pBolCant][6]);
	    INI_Int("bolcant7",PlayerInfo[playerid][pBolCant][7]);
		return 0;
	}
Reply


Messages In This Thread
problem con guardado de bolsillos :/ - by maicolpao - 10.02.2015, 14:19
Respuesta: problem con guardado de bolsillos :/ - by jotajeda - 10.02.2015, 14:46
Re: problem con guardado de bolsillos :/ - by maicolpao - 10.02.2015, 15:42
Respuesta: problem con guardado de bolsillos :/ - by jotajeda - 10.02.2015, 15:46
Re: problem con guardado de bolsillos :/ - by maicolpao - 10.02.2015, 15:57
Respuesta: problem con guardado de bolsillos :/ - by jotajeda - 10.02.2015, 16:24

Forum Jump:


Users browsing this thread: 1 Guest(s)