SA-MP Forums Archive
can someone fix these - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: can someone fix these (/showthread.php?tid=418001)



can someone fix these - mittukuttan - 23.02.2013

i want them to come together.


public OnPlayerDisconnect(playerid, reason)
{
#pragma unused reason
playerSuperman[playerid] = false;
return true;
}

new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid)) ;
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_Close(File);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
playerSuperman[playerid] = false;
return true;
}
{
PlayerInfo[killerid][pKills]++;
PlayerInfo[playerid][pDeaths]++;
return 1;
}


Re: can someone fix these - Misiur - 23.02.2013

Use [ pawn] tag to enclose code


pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    #pragma unused reason
    playerSuperman[playerid] = false;

    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
    INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
    INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
    INI_Close(File);
    return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
    playerSuperman[playerid] = false;
    PlayerInfo[killerid][pKills]++;
    PlayerInfo[playerid][pDeaths]++;
    return 1;
}



Re: can someone fix these - mittukuttan - 23.02.2013

u rock