Whats wrong with this functions - 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)
+--- Thread: Whats wrong with this functions (
/showthread.php?tid=382249)
Whats wrong with this functions -
Gangster-rocks - 02.10.2012
pawn Код:
stock WriteInlog(name[],str[])
{
new location[128];
format(location,sizeof(location),"%s.sav",name);
if(fexist(location))
{
new File:log = fopen(location,io_append);
fwrite(log,str);
fclose(log);
}
else { printf("Log %s is not found",location);}
return 1;
}
stock Createlog(name[])
{
new location[128];
format(location,sizeof(location),"%s.sav",name);
new File:log = fopen(location,io_append);
fclose(log);
return 1;
}
its writes but only one line how to make it writes every player that has used a command and ban log ect
Re: Whats wrong with this functions -
Gangster-rocks - 02.10.2012
bumb sorry for it but i need help
Re: Whats wrong with this functions -
RedFusion - 02.10.2012
replace stock with public, might help
remember to forward both of the functions.
Re: Whats wrong with this functions -
Gangster-rocks - 02.10.2012
its works but its writes like this cords {1157880709,1151388825,1093476352);cords {1156893723,1151853832,1098251876);cords {1157908540,1151778665,1093476352);
Re: Whats wrong with this functions -
TheDeadlyDutchi - 02.10.2012
You're writing an string to the file, but the coords are an float. You should format them into an float and then write that string to the file.
Re: Whats wrong with this functions -
Gangster-rocks - 02.10.2012
I know and i fix it i have to add \r\n on the end