Untitled.pwn 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4. #include <a_samp>
  5. #include <zcmd>
  6. #include <sscanf2>
  7. public OnFilterScriptInit()
  8. {
  9. print("\n--------------------------------------");
  10. print(" Blank Filterscript by your name here");
  11. print("--------------------------------------\n");
  12. return 1;
  13. }
  14. public OnFilterScriptExit()
  15. {
  16. return 1;
  17. }
  18. CMD:getcpos(playerid, params[])
  19. {
  20. new Float:cxp, Float:cyp, Float:czp, str[256], fName[60];
  21. if(sscanf(params, "s[60]", fName)) return SendClientMessage(playerid, 0xFF0000, "Usage: /getcpos (coordinate_name) {FFFFFF} | Example: /getcpos sf camera point");
  22. GetPlayerCameraPos(playerid, cxp, cyp, czp);
  23. format(str, sizeof(str), "Camera coordinate name:%s | X:%f | Y:%f |Z:%f | Function: SetPlayerCameraPos(playerid, %f, %f, %f); /***/ \r\n", fName, cxp, cyp, czp, cxp, cyp, czp);
  24. new File:cpos = fopen("Camera_Coords.txt", io_append);
  25. if(cpos)
  26. {
  27. fwrite(cpos, str);
  28. fclose(cpos);
  29. SendClientMessage(playerid, 0xFF0000, "Camera position successfully generated!");
  30. }
  31. return 1;
  32. }
  33. CMD:getfangle(playerid, params[])
  34. {
  35. new Float:ang, str[256], fName[60];
  36. if(sscanf(params, "s[60]", fName)) return SendClientMessage(playerid, 0xFF0000, "Usage: /getfangle (coordinate_name) {FFFFFF} | Example: /getfangle fangle1 point");
  37. GetPlayerFacingAngle(playerid, ang);
  38. format(str, sizeof(str), "Facing Angle name:%s | Angle:%f | Function: SetPlayerFacingAngle(playerid, %f); /***/ \r\n", fName, ang, ang);
  39. new File:cpos = fopen("Facing_Angle.txt", io_append);
  40. if(cpos)
  41. {
  42. fwrite(cpos, str);
  43. fclose(cpos);
  44. SendClientMessage(playerid, 0xFF0000, "Facing Angle successfully generated!");
  45. }
  46. return 1;
  47. }