01.09.2010, 15:18
if i have somthing like that:
its a file, i want if i make command its will delete the first name.
pawn Код:
Gara_Vega
Hasd_Aasda
Jada_Akvmd
Gara_Vega
Hasd_Aasda
Jada_Akvmd
new name[MAX_PLAYER_NAME], file[100];
GetPlayerName(target, name, sizeof name);
format(file, sizeof file, "onlist_players.ini", name);
new File:fileo = fopen(file, io_read)
{
if(strfind(fileo, name, true) != 1)
{
strdel(fileo, 0, MAX_PLAYER_NAME);
}
}
if(strcmp(cmd, "/deleteapp", true) == 0)
{
//if(PlayerInfo[playerid][pAdmin] >= 1)
//{
new tmppass[64];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /deleteapp [NAME]");
return 1;
}
new name[MAX_PLAYER_NAME], file[100];
format(file, sizeof file, "Logs/WaitList.ini");
new File:fileo = fopen(file, io_read);
if (fileo)
{
if(strfind(fileo, tmp, true) != 1)
{
strdel(fileo, 0, MAX_PLAYER_NAME);
}
}
}
if(strfind(fileo, tmp, true) != 1)
strdel(fileo, 0, MAX_PLAYER_NAME);