28.05.2014, 15:31
pawn Код:
CMD:ban (playerid, params[])
{
// replace targetid with the variable you use in your ban cmd and add this code
new str[128];
format(str, sizeof(str), "%s(%d) banned %s(%d)", GetName(playerid), playerid, GetName(targetid), targetid);
new File:log;
log = fopen("Logs/banslog", io_append);
fwrite(log, str);
fclose(log);
return 1;
}
//-------------
stock GetName(playerid)
{
new pName[MAX_PLAYERS];
GetPlayerName(playerid, pName, sizeof(pName));
return pName;
}
You can learn better from this tutorial:
http://forum.sa-mp.com/showthread.ph...highlight=logs
EDIT: Were you looking for this^?