Delete custom name from files
#1

Hey guy's,
I've a file with a few names:
Код:
Zcelo12
ProGamer
HardCore
And with a command i ant to remove the name "HardCore".
But i don't know how to make that. I tried taht one:

Код:
CMD:removebl(playerid,params[])
{
if (PlayerOrg[playerid] == 0) return SendError(playerid," You aren't in any faction!");
if(IsLeader(playerid) || IsPlayerRank(playerid) > 2)
{
new id;
if(sscanf(params,"u",id)) return SendUsage(playerid," /removebl [playerid]");
if(!IsPlayerConnected(id) || IsPlayerNPC(id)) return SendError(playerid," Player is not connected!");
if(Org_Blacklist(id,GetOrgID(oPlayerName(id))))
{
new name[64];
format(name,sizeof(name),"%s.ini",GetOrgName(PlayerOrg[playerid]));
new File: file = fopen(name, io_read);
if(file)
{
new valtmp[MAX_PLAYER_NAME];
while (fread(file, valtmp))
{
StripNewLine(valtmp);
if (!strcmp(valtmp, oPlayerName(playerid), true, strlen(oPlayerName(playerid))))
{
strdel(valtmp,0,24);
fclose(file);
return 1;
}
}
}
}
}
return 1;
}
I hope anyone can help me.
Greetings
Reply


Messages In This Thread
Delete custom name from files - by Zcelo12 - 14.01.2012, 12:42
AW: Delete custom name from files - by Zcelo12 - 14.01.2012, 13:39
AW: Delete custom name from files - by Nero_3D - 14.01.2012, 14:02
AW: Delete custom name from files - by Zcelo12 - 16.01.2012, 10:56
AW: Delete custom name from files - by Nero_3D - 20.01.2012, 12:27

Forum Jump:


Users browsing this thread: 1 Guest(s)