Originally Posted by AFerreira
hmm, nessa parte:
pawn Код:
Escrever("ClassPosions.txt","//=============================================================== \r\n"); Escrever("ClassPosions.txt","NA PUBLIC OnPlayerRequestClass COLE ISTO:\r\n"); Escrever("ClassPosions.txt","//\r\n"); format(string,sizeof(string),"SetPlayerPos(playerid, %f, %f, %f);\r\n",pPos[0],pPos[1],pPos[2]); Escrever("ClassPosions.txt",string); format(string,sizeof(string),"SetPlayerCameraPos(playerid, %f, %f, %f);\r\n",pPos[4],pPos[5],pPos[2]); Escrever("ClassPosions.txt",string); format(string,sizeof(string),"SetPlayerCameraLookAt(playerid, %f, %f, %f);\r\n",pPos[0],pPos[1],pPos[2]); Escrever("ClassPosions.txt",string); format(string,sizeof(string),"SetPlayerFacingAngle(playerid, %f);\r\n",pPos[3]); Escrever("ClassPosions.txt",string);
//-- stock Escrever(const arquivo[],string[]) { new File:filex = fopen(arquivo, io_append); fwrite(filex, string); fclose(filex); }
Vocк abre e fecha o arquivo toda hora que usa 'Escrever'.
pawn Код:
new File: filex = fopen("ClassPosions.txt", io_append); fwrite(filex,"//=============================================================== \r\n"); fwrite(filex,"NA PUBLIC OnPlayerRequestClass COLE ISTO:\r\n"); fwrite(filex,"//\r\n"); format(string,sizeof(string),"SetPlayerPos(playerid, %f, %f, %f);\r\n",pPos[0],pPos[1],pPos[2]); fwrite(filex,string); format(string,sizeof(string),"SetPlayerCameraPos(playerid, %f, %f, %f);\r\n",pPos[4],pPos[5],pPos[2]); fwrite(filex,string); format(string,sizeof(string),"SetPlayerCameraLookAt(playerid, %f, %f, %f);\r\n",pPos[0],pPos[1],pPos[2]); fwrite(filex,string); format(string,sizeof(string),"SetPlayerFacingAngle(playerid, %f);\r\n",pPos[3]); fwrite(filex,string); fclose(filex);
|