forward test(playerid,password[]); public test(playerid,password[]) { new string2[128]; format(string2, sizeof(string2), "User/%s.ini",password); if(dini_Exists(string2)) { fremove("string2"); SendClientMessage(playerid, COLOR_WHITE, "success"); return 1; } SendClientMessage(playerid, COLOR_WHITE, "fail"); return 1; }
CMD:delplayeroff(playerid,params[]) { new name[24]; if(!sscanf(params, "s[24]", name)) { new string2[128]; format(string2, sizeof(string2), "User/%s.ini",name); if(!dini_Exists(string2)) return SendClientMessage(playerid, -1, "Invalid player name."); fremove("string2"); SendClientMessage(playerid, -1, "success"); } else return SendClientMessage(playerid, -1, "USAGE: /delplayeroff [playername]"); return 1; }
I have not tried this code , but you might like to delete a file , but I suggest using y_ini , because dini old
Код:
CMD:delplayeroff(playerid,params[]) { new name[24]; if(!sscanf(params, "s[24]", name)) { new string2[128]; format(string2, sizeof(string2), "User/%s.ini",name); if(!dini_Exists(string2)) return SendClientMessage(playerid, -1, "Invalid player name."); fremove("string2"); SendClientMessage(playerid, -1, "success"); } else return SendClientMessage(playerid, -1, "USAGE: /delplayeroff [playername]"); return 1; } |
CMD:delplayeroff(playerid,params[])
{
new name[24];
if(!sscanf(params, "s[24]", name))
{
new string2[128];
format(string2, sizeof(string2), "User/%s.ini",name);
if(!dini_Exists(string2)) return SendClientMessage(playerid, -1, "Invalid player name.");
dini_Remove(string);
SendClientMessage(playerid, -1, "success");
} else return SendClientMessage(playerid, -1, "USAGE: /delplayeroff [playername]");
return 1;
}