public OnPlayerDisconnect(playerid, reason)
{
if(P_Logged[playerid] == 1)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Account Data");
INI_WriteInt(File,"Admin",PlayerInfo[playerid][P_Admin]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][P_Kills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][P_Deaths]);
INI_WriteInt(File,"Money",GetPlayerMoney(playerid));
INI_WriteInt(File,"Interior",GetPlayerInterior(playerid));
INI_WriteInt(File,"VirtualWorld",GetPlayerVirtualWorld(playerid));
INI_WriteFloat(File,"Health",PlayerInfo[playerid][P_Health]);
INI_WriteFloat(File,"Armour",PlayerInfo[playerid][P_Armour]);
INI_Close(File);
GetPlayerHealth(playerid, P_Health);
GetPlayerArmour(playerid, P_Armour);
}
return 1;
}
Gamemode.pwn(96) : error 035: argument type mismatch (argument 2)
Gamemode.pwn(97) : error 035: argument type mismatch (argument 2)
GetPlayerHealth(playerid, P_Health);
GetPlayerArmour(playerid, P_Armour);
GetPlayerHealth(playerid, PlayerInfo[playerid][P_Health]);
GetPlayerArmour(playerid, PlayerInfo[playerid][P_Armour]);
please replace
pawn Код:
pawn Код:
|
public OnPlayerDisconnect(playerid, reason)
{
if(P_Logged[playerid] == 1)
{
new INI:File = INI_Open(UserPath(playerid));
GetPlayerHealth(playerid, PlayerInfo[playerid][P_Health]);
GetPlayerArmour(playerid, PlayerInfo[playerid][P_Armour]);
INI_SetTag(File,"Account Data");
INI_WriteInt(File,"Admin",PlayerInfo[playerid][P_Admin]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][P_Kills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][P_Deaths]);
INI_WriteInt(File,"Money",GetPlayerMoney(playerid));
INI_WriteInt(File,"Interior",GetPlayerInterior(playerid));
INI_WriteInt(File,"VirtualWorld",GetPlayerVirtualWorld(playerid));
INI_WriteFloat(File,"Health",PlayerInfo[playerid][P_Health]);
INI_WriteFloat(File,"Armour",PlayerInfo[playerid][P_Armour]);
INI_Close(File);
}
return 1;
}