SA-MP Forums Archive
fremove? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: fremove? (/showthread.php?tid=144314)



fremove? - Mechscape - 26.04.2010

https://sampwiki.blast.hk/wiki/Fremove

That works only in Scriptfiles folder?
I have users folder in Scriptfiles.

Код:
/Root/
/Root/scriptfiles
/Root/scriptfiles/users
Like Picharelo.ini

/Root/scriptfiles/users/Picharelo.ini

Then:

fremove("/users/Picharelo.ini"); ?

Код:
 	new plname[MAX_PLAYER_NAME];
 	GetPlayerName(playerid, plname, sizeof(plname));
 	new namestring = strfind(plname, "_", true);
 	if(namestring == -1)
	{
		SendClientMessage(playerid, COLOR_YELLOW2, "[NIMIKONTROLLIJA] Su nimi ei ole sobiv!");
		SendClientMessage(playerid, COLOR_YELLOW2, "[NIMIKONTROLLIJA] Su nimi peab olema formaatides Eesnimi_Perenimi.");
 	 	fremove(plname);
		Kick(playerid);
		return 1;
	}



Re: fremove? - Jefff - 26.04.2010

Код:
 	new plname[MAX_PLAYER_NAME],str[36];
 	GetPlayerName(playerid, plname, sizeof(plname));
	format(str,36,"/users/%s.ini",plname);
 	new namestring = strfind(plname, "_", true);
 	if(namestring == -1)
	{
		SendClientMessage(playerid, COLOR_YELLOW2, "[NIMIKONTROLLIJA] Su nimi ei ole sobiv!");
		SendClientMessage(playerid, COLOR_YELLOW2, "[NIMIKONTROLLIJA] Su nimi peab olema formaatides Eesnimi_Perenimi.");
 	 	if(fexist(str)) fremove(str);
		Kick(playerid);
		return 1;
	}
Only works in scriptfiles folder