Advertisement
Guest User

Savecam

a guest
Apr 21st, 2013
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. [hr][size=2][color=blue][b]Dupla hozzászólás automatikusan összefűzve. ( [time]1366554984[/time] )[/b][/color][/size][hr]
  2. if(!strcmp("/savecam",cmdtext,true))
  3. {
  4. new Float:pX, Float:pY, Float:pZ;
  5. new Float:Angle;
  6. new Float:cX, Float:cY, Float:cZ;
  7. GetPlayerPos(playerid, pX, pY, pZ);
  8. GetPlayerCameraPos(playerid, cX, cY, cZ);
  9. GetPlayerFacingAngle(playerid, Angle);
  10. new string[512];
  11. format(string, 512, "SetPlayerPos(playerid, %.3f, %.3f, %.3f);\r\nSetPlayerFacingAngle(playerid, %.3f);\r\nSetPlayerCameraPos(playerid, %.3f, %.3f, %.3f);\r\nSetPlayerCameraLookAt(playerid, %.3f, %.3f, %.3f);",
  12. pX, pY, pZ, Angle, cX, cY, cZ, pX, pY, pZ);
  13. new File:cam_file;
  14. cam_file = fopen("StRt/SavedCamPostions.txt", io_append);
  15. if(cam_file)
  16. {
  17. fwrite(cam_file, string);
  18. fwrite(cam_file,"\r\n");
  19. fclose(cam_file);
  20. }
  21. return 1;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement