09.12.2013, 21:19
Код:
YCMD:whish(playerid, params[], help)
{
#pragma unused help
new whish[128-MAX_PLAYER_NAME-10]; // 5 cells lower cuz of extra chars
if(sscanf(params, "s[128]", whish)) return SendClientMessage(playerid, -1, "Usage: /whish [text]");
else if(strlen(whish) <= 10) return SendClientMessage(playerid, -1, "Please input more than 10 characters!");
new pNm[24];
GetPlayerName(playerid, pNm, 24);
new string[128];
format(string, 128, "|%s suggest: %s\n", pNm, whish);
new File:sFile;
sFile = fopen("whishes.txt", io_append);
fwrite(sFile, string);
fclose(sFile);
return true;
}

