[Ajuda] DOF2
#1

Bem, й o seguinte. No comando abaixo o DOF2 nгo salva o que ele tem que salvar.
E estб dando esse warning: warning 202: number of arguments does not match definition
Esse Warning estб no cуdigo abaixo no "DOF2_SaveFile(path);"

Код:
CMD:salvarpos(playerid, params[]) {
	if(TaX1[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
	if(TaMG[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
	if(TaSN[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
	if(TaRPG[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
	if(Ta69[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
	new Jogador[MAX_PLAYER_NAME];
	new path[50];
	GetPlayerName(playerid, Jogador, sizeof(Jogador));
	GetPlayerPos(playerid,KenX[playerid],KenY[playerid],KenZ[playerid]);
	GetPlayerFacingAngle(playerid,KenA[playerid]);
	format(path, sizeof(path), "%s.cord", Jogador);
	DOF2_SetFloat(path,"CoordenadaX",KenX[playerid]);
	DOF2_SetFloat(path,"CoordenadaY",KenY[playerid]);
	DOF2_SetFloat(path,"CoordenadaZ",KenZ[playerid]);
	DOF2_SetFloat(path,"CoordenadaA",KenA[playerid]);
	DOF2_SaveFile(path);
	SalvarInformacoes(playerid);
	SendClientMessage(playerid, 0x00FFFFAA, "[SERVER] Para retornar para cб use: /voltar");
	return 1;
}
_____________________
Tambйm, como eu passo isso:
Код:
public SalvarInformacoes(playerid)
{
format(arquivo, sizeof(arquivo), "%s.ini",ppNome(playerid));
INI_Open(arquivo);
INI_WriteInt("Matou", ProgressaoInfo[playerid][Matou]);
INI_WriteInt("Morreu", ProgressaoInfo[playerid][Morreu]);
INI_Save();
INI_Close();
return true;
}
Para DOF2? Nгo sei transferir SII para DOF2, sу DINI \=
Reply
#2

Tente:
pawn Код:
CMD:salvarpos(playerid, params[]) {
    if(TaX1[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
    if(TaMG[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
    if(TaSN[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
    if(TaRPG[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
    if(Ta69[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
    new Jogador[MAX_PLAYER_NAME];
    new path[50];
    GetPlayerName(playerid, Jogador, sizeof(Jogador));
    GetPlayerPos(playerid,KenX[playerid],KenY[playerid],KenZ[playerid]);
    GetPlayerFacingAngle(playerid,KenA[playerid]);
    format(path, sizeof(path), "%s.cord", Jogador);
    DOF2_CreateFile(path);
    DOF2_SetFloat(path,"CoordenadaX",KenX[playerid]);
    DOF2_SetFloat(path,"CoordenadaY",KenY[playerid]);
    DOF2_SetFloat(path,"CoordenadaZ",KenZ[playerid]);
    DOF2_SetFloat(path,"CoordenadaA",KenA[playerid]);
    DOF2_SaveFile();
    SalvarInformacoes(playerid);
    SendClientMessage(playerid, 0x00FFFFAA, "[SERVER] Para retornar para cб use: /voltar");
    return 1;
}
-
pawn Код:
public SalvarInformacoes(playerid)
{
format(arquivo, sizeof(arquivo), "%s.ini",ppNome(playerid));
DOF2_CreateFile(arquivo);
DOF2_SetInt(arquivo,"Matou", ProgressaoInfo[playerid][Matou]);
DOF2_SetInt(arquivo,"Morreu", ProgressaoInfo[playerid][Morreu]);
DOF2_SaveFile();
return true;
}
Acho que e isso '-'
Reply
#3

Quote:
Originally Posted by @Riichard
Посмотреть сообщение
Tente:
pawn Код:
CMD:salvarpos(playerid, params[]) {
    if(TaX1[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
    if(TaMG[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
    if(TaSN[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
    if(TaRPG[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
    if(Ta69[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
    new Jogador[MAX_PLAYER_NAME];
    new path[50];
    GetPlayerName(playerid, Jogador, sizeof(Jogador));
    GetPlayerPos(playerid,KenX[playerid],KenY[playerid],KenZ[playerid]);
    GetPlayerFacingAngle(playerid,KenA[playerid]);
    format(path, sizeof(path), "%s.cord", Jogador);
    DOF2_CreateFile(path);
    DOF2_SetFloat(path,"CoordenadaX",KenX[playerid]);
    DOF2_SetFloat(path,"CoordenadaY",KenY[playerid]);
    DOF2_SetFloat(path,"CoordenadaZ",KenZ[playerid]);
    DOF2_SetFloat(path,"CoordenadaA",KenA[playerid]);
    DOF2_SaveFile();
    SalvarInformacoes(playerid);
    SendClientMessage(playerid, 0x00FFFFAA, "[SERVER] Para retornar para cб use: /voltar");
    return 1;
}
-
pawn Код:
public SalvarInformacoes(playerid)
{
format(arquivo, sizeof(arquivo), "%s.ini",ppNome(playerid));
DOF2_CreateFile(arquivo);
DOF2_SetInt(arquivo,"Matou", ProgressaoInfo[playerid][Matou]);
DOF2_SetInt(arquivo,"Morreu", ProgressaoInfo[playerid][Morreu]);
DOF2_SaveFile();
return true;
}
Acho que e isso '-'
Valeuzгo '-'
Porйm...
Код:
CMD:voltar(playerid, params[]) {
	if(TaX1[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
	if(TaMG[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
	if(TaSN[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
	if(TaRPG[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
	if(Ta69[playerid] == true){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] Vocк nгo pode usar esse comando aqui!");}
	new VolteiPraCa[MAX_PLAYER_NAME];
	new voltarcoordenada[256];
	GetPlayerName(playerid, VolteiPraCa, sizeof(VolteiPraCa));
	format(voltarcoordenada, sizeof(voltarcoordenada), "%s.cord", VolteiPraCa);
	if(!DOF2_FileExists(voltarcoordenada))
	{
		KenX[playerid] = DOF2_GetInt(voltarcoordenada,"CoordenadaX");
		KenY[playerid] = DOF2_GetInt(voltarcoordenada,"CoordenadaY");
		KenZ[playerid] = DOF2_GetInt(voltarcoordenada,"CoordenadaZ");
		KenA[playerid] = DOF2_GetInt(voltarcoordenada,"CoordenadaA");
		if(IsPlayerInAnyVehicle(playerid)) {
			new VehicleID;
			VehicleID = GetPlayerVehicleID(playerid);
			SetVehiclePos(VehicleID,KenX[playerid],KenY[playerid],KenZ[playerid]);
			SetVehicleZAngle(GetPlayerVehicleID(playerid), 00.0);
			GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
			}else{
			SetPlayerPos(playerid,KenX[playerid],KenY[playerid],KenZ[playerid]);
			GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
		}
		SetPlayerFacingAngle(playerid, KenA[playerid]);
		SetCameraBehindPlayer(playerid);
	}
	return SendClientMessage(playerid, 0x33FF00FF, "[SERVER] Vocк voltou para suas coordenadas salvas!");
}
Esse nгo funfa
(Esse seria o de voltar) D;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)