Help me. read all files - 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: Help me. read all files (
/showthread.php?tid=213474)
Help me. read all files -
Xa0s - 19.01.2011
Hello excuse for bad English as I know Russian badly your language. Will start I want to make at command input opening all files of players which and on the server was made at once and not on him the sketch of a command at me is it is necessary to alter only in a command as there is that that it is necessary to replace to me it is just necessary to make discovery of all files and their rewriting help
Here a command:
PHP код:
if(strcmp(cmd,"/write",true)==0){
for(new i = 0; i < MAX_PLAYERS; i++)
{
Pickups[i] = 0;
close[0][i] = 0;
close[1][i] = 0;
close[2][i] = 0;
close[3][i] = 0;
close[4][i] = 0;
close[5][i] = 0;
close[6][i] = 0;
close[7][i] = 0;
close[8][i] = 0;
close[9][i] = 0;
close[10][i] = 0;
close[11][i] = 0;
close[12][i] = 0;
close[13][i] = 0;
close[14][i] = 0;
close[15][i] = 0;
}
new filename[64];
GetPlayerName(playerid, filename, 24);
format(filename, sizeof(filename), "Users/%s.akk", filename);
format(string,sizeof(string),"%s\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nPickup=%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nPickups[playerid]", PlayerInfo[playerid][password],
PlayerInfo[playerid][Deaths], GetPlayerScore(playerid), PlayerInfo[playerid][TeamKills], GetPlayerMoney(playerid), PlayerInfo[playerid][BankMoney], PlayerInfo[playerid][VIP],PlayerInfo[playerid][Admin],close[0][playerid],
close[1][playerid],close[2][playerid],close[3][playerid],close[4][playerid],close[5][playerid],close[6][playerid],close[7][playerid],close[8][playerid],close[9][playerid],close[10][playerid],close[11][playerid],close[12][playerid],close[13][playerid],close[14][playerid],close[15][playerid],Pickups[playerid]);
new File:f = fopen(filename, io_write);
fwrite(f,string);
fclose(f);
}
Re: Help me. read all files -
Xa0s - 19.01.2011
Difficult question. Not who doesn't know?
Re: Help me. read all files -
Xa0s - 19.01.2011
Up..............
Re: Help me. read all files -
Xa0s - 19.01.2011
pliz help me.
Re: Help me. read all files -
[UG]Scripter - 19.01.2011
Read this
https://sampforum.blast.hk/showthread.php?tid=45235
READ THIS BEFORE POSTING! (RULES TO FOLLOW)
a) Use a proper subject
Something like '------------>HELP PLZ FAST NOW HELP!!!!!!!!!!!<----------' is not very descriptive and very annoying.
Make a proper subject with a short description, such as 'Gates won't open' or 'Game crashes instantly'
b) Do not bump
Some people apparently think they are important enough to bump their own topic after 10 minutes.
You can bump topics when the last reply is at least 48 hours old, and it needs to have useful information about your problem.
2) What seems to be the issue?