enum infop
{
Float:pX,
Float:pY,
Float:pZ
}
public OnPlayerDisconnect(playerid)
{
GetPlayerPos(playerid, pX, pY, pZ);
DOF2_SetInt(arquivo, "pX", Player[playerid][Float:pX]);
DOF2_SetInt(arquivo, "pY", Player[playerid][Float:pY]);
DOF2_SetInt(arquivo, "pZ", Player[playerid][Float:pZ]);
return 1;
}
C:\Users\User\Desktop\SAMP\gamemodes\GM.pwn(117) : error 035: argument type mismatch (argument 2) C:\Users\User\Desktop\SAMP\gamemodes\GM.pwn(126) : warning 213: tag mismatch C:\Users\User\Desktop\SAMP\gamemodes\GM.pwn(126) : warning 213: tag mismatch C:\Users\User\Desktop\SAMP\gamemodes\GM.pwn(127) : warning 213: tag mismatch C:\Users\User\Desktop\SAMP\gamemodes\GM.pwn(127) : warning 213: tag mismatch C:\Users\User\Desktop\SAMP\gamemodes\GM.pwn(128) : warning 213: tag mismatch C:\Users\User\Desktop\SAMP\gamemodes\GM.pwn(128) : warning 213: tag mismatch Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
|
Alguйm poderia me ajudar ?
Код:
enum infop
{
Float:pX,
Float:pY,
Float:pZ
};
|
public OnPlayerDisconnect(playerid)
{
DOF2_SetInt(arquivo, "pX", Player[playerid][pX]);
DOF2_SetInt(arquivo, "pY", Player[playerid][pY]);
DOF2_SetInt(arquivo, "pZ", Player[playerid][pZ]);
return 1;
}
|
PHP код:
|
public OnPlayerDisconnect(playerid)
{
new arquivo[40], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, 32);
GetPlayerPos(playerid, pX, pY, pZ);
format(arquivo, 40, "Contas/%s.ini", name);
if(DOF2_FileExists(arquivo))
{
Player[playerid][Dinheiro] = GetPlayerMoney(playerid);
DOF2_SetInt(arquivo, "Senha", Player[playerid][Senha]);
DOF2_SetInt(arquivo, "Matou", Player[playerid][Matou]);
DOF2_SetInt(arquivo, "Morreu", Player[playerid][Morreu]);
DOF2_SetInt(arquivo, "Dinheiro", Player[playerid][Dinheiro]);
DOF2_SetInt(arquivo, "pX", Player[playerid][pX]);
DOF2_SetInt(arquivo, "pY", Player[playerid][pY]);
DOF2_SetInt(arquivo, "pZ", Player[playerid][pZ]);
DOF2_SaveFile();
}
return 1;
}
public OnPlayerDisconnect(playerid)
{
new arquivo[40], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, 32);
GetPlayerPos(playerid, Player[playerid][pX], Player[playerid][pY], Player[playerid][pZ]);
format(arquivo, 40, "Contas/%s.ini", name);
if(DOF2_FileExists(arquivo))
{
Player[playerid][Dinheiro] = GetPlayerMoney(playerid);
DOF2_SetInt(arquivo, "Senha", Player[playerid][Senha]);
DOF2_SetInt(arquivo, "Matou", Player[playerid][Matou]);
DOF2_SetInt(arquivo, "Morreu", Player[playerid][Morreu]);
DOF2_SetInt(arquivo, "Dinheiro", Player[playerid][Dinheiro]);
DOF2_SetFloat(arquivo, "pX", Player[playerid][pX]);
DOF2_SetFloat(arquivo, "pY", Player[playerid][pY]);
DOF2_SetFloat(arquivo, "pZ", Player[playerid][pZ]);
DOF2_SaveFile();
}
return 1;
}
|
Код:
public OnPlayerDisconnect(playerid)
{
new arquivo[40], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, 32);
GetPlayerPos(playerid, Player[playerid][pX], Player[playerid][pY], Player[playerid][pZ]);
format(arquivo, 40, "Contas/%s.ini", name);
if(DOF2_FileExists(arquivo))
{
Player[playerid][Dinheiro] = GetPlayerMoney(playerid);
DOF2_SetInt(arquivo, "Senha", Player[playerid][Senha]);
DOF2_SetInt(arquivo, "Matou", Player[playerid][Matou]);
DOF2_SetInt(arquivo, "Morreu", Player[playerid][Morreu]);
DOF2_SetInt(arquivo, "Dinheiro", Player[playerid][Dinheiro]);
DOF2_SetFloat(arquivo, "pX", Player[playerid][pX]);
DOF2_SetFloat(arquivo, "pY", Player[playerid][pY]);
DOF2_SetFloat(arquivo, "pZ", Player[playerid][pZ]);
DOF2_SaveFile();
}
return 1;
}
|

new Float:pPosX[MAX_PLAYERS], Float:pPosY[MAX_PLAYERS], Float:pPosZ[MAX_PLAYERS];//topo do gm
public OnPlayerDisconnect(playerid)
{
new pName[MAX_PLAYER_NAME], arquivo[56];
GetPlayerName(playerid, pName, sizeof(pName));
format(arquivo, 56, "Pos/%s", pName);//muda de acordo com seu diretorio
GetPlayerPos(playerid, pPosX[playerid], pPosY[playerid], pPosZ[playerid]);//pega a posiзгo do player
DOF2_SetFloat(arquivo, "PosX", pPosX[playerid]);
DOF2_SetFloat(arquivo, "PosY", pPosY[playerid]);
DOF2_SetFloat(arquivo, "PosZ", pPosZ[playerid]);
return 1;
}
|
Код:
public OnPlayerDisconnect(playerid)
{
new arquivo[40], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, 32);
GetPlayerPos(playerid, pX, pY, pZ);
format(arquivo, 40, "Contas/%s.ini", name);
if(DOF2_FileExists(arquivo))
{
Player[playerid][Dinheiro] = GetPlayerMoney(playerid);
DOF2_SetInt(arquivo, "Senha", Player[playerid][Senha]);
DOF2_SetInt(arquivo, "Matou", Player[playerid][Matou]);
DOF2_SetInt(arquivo, "Morreu", Player[playerid][Morreu]);
DOF2_SetInt(arquivo, "Dinheiro", Player[playerid][Dinheiro]);
DOF2_SetInt(arquivo, "pX", Player[playerid][pX]);
DOF2_SetInt(arquivo, "pY", Player[playerid][pY]);
DOF2_SetInt(arquivo, "pZ", Player[playerid][pZ]);
DOF2_SaveFile();
}
return 1;
}
|
public OnPlayerSpawn(playerid)
{
SetPlayerPos(playerid, pX, pY, pZ);
return 1;
}
|
C:\Users\User\Desktop\SAMP\gamemodes\GM.pwn(13 : warning 213: tag mismatchC:\Users\User\Desktop\SAMP\gamemodes\GM.pwn(13 : warning 213: tag mismatchC:\Users\User\Desktop\SAMP\gamemodes\GM.pwn(13 : warning 213: tag mismatchPawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Warnings. |