SA-MP Forums Archive
Help with stock.. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with stock.. (/showthread.php?tid=183965)



Help with stock.. - The_Moddler - 17.10.2010

pawn Код:
stock UpdateTOP5(playerid)
{
    new string[128], buffer[64], Float: Promedio, name[25], tmp[64],
    File: top = fopen("/Top5/Top5.ini", io_append);
    GetPlayerName(playerid, name, 25);
    Promedio = floatdiv(kills[playerid]+deaths[playerid]+GetPlayerScore(playerid), 3);
    format(buffer, 64, "%s %d\r\n", name, floatround(Promedio, floatround_round));
    fclose(top);
    return 1;
}
So.. how can I do to check if the player is not on the list, add his stats, else if he is, to overwrite the existing stats for that person?

Thanks