Advertisement
Guest User

Untitled

a guest
Jul 10th, 2012
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. /*
  2. v_Coordinates
  3. by: Vanilla
  4. v0.1
  5.  
  6. Creditsi -> Gagi - Pomoć oko malog warninga <3
  7. Joey_ - Ideja!!! <3
  8. Vanilla - Izrada Filterskripte
  9.  
  10. Ko makne creditse, ćelava mu majka!
  11.  
  12. http://www.youtube.com/watch?v=5ds7oE1GAgw
  13.  
  14. */
  15. #include <a_samp>
  16. #include <zcmd>
  17.  
  18. new Aktiviran[MAX_PLAYERS];
  19. new TP[MAX_PLAYERS];
  20.  
  21. public OnFilterScriptInit()
  22. {
  23. print("\nCoordinate Get by Vanilla\n");
  24. return 1;
  25. }
  26.  
  27. main()
  28. {
  29. print("\nCoordinate Get by Vanilla\n");
  30. }
  31.  
  32. public OnPlayerConnect(playerid)
  33. {
  34. Aktiviran[playerid] = 0;
  35. TP[playerid] = 0;
  36. return 1;
  37. }
  38.  
  39. public OnPlayerDisconnect(playerid, reason)
  40. {
  41. Aktiviran[playerid] = 0;
  42. TP[playerid] = 0;
  43. return 1;
  44. }
  45.  
  46. public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
  47. {
  48. if(Aktiviran[playerid] == 1)
  49. {
  50. SetPlayerPosFindZ(playerid, fX, fY, fZ);
  51. SpremiKoordinate(fX,fY,fZ);
  52. }
  53. if(TP[playerid] == 1)
  54. {
  55. SetPlayerPosFindZ(playerid, fX, fY, fZ);
  56. SetPlayerPos(playerid,fX,fY,fZ);
  57. }
  58. return 1;
  59. }
  60.  
  61. CMD:cg(playerid,params[])
  62. {
  63. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Niste RCON Administrator!");
  64. if(Aktiviran[playerid] == 1)
  65. {
  66. Aktiviran[playerid] = 0;
  67. SendClientMessage(playerid, -1, "Ugasili ste Coordinate Get mogucnost!");
  68. }
  69. else
  70. {
  71. Aktiviran[playerid] = 1;
  72. SendClientMessage(playerid, -1, "Upalili ste Coordinate Get mogucnost!");
  73. }
  74. return true;
  75. }
  76.  
  77. CMD:tpa(playerid,params[])
  78. {
  79. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Niste RCON Administrator!");
  80. if(TP[playerid] == 1)
  81. {
  82. TP[playerid] = 0;
  83. SendClientMessage(playerid, -1, "Ugasili ste mogucnost teleportiranja po mapi!");
  84. }
  85. else
  86. {
  87. TP[playerid] = 1;
  88. SendClientMessage(playerid, -1, "Upalili ste mogucnost teleportiranja po mapi");
  89. }
  90. return true;
  91. }
  92.  
  93. stock SpremiKoordinate(Float:fX,Float:fY,Float:fZ)
  94. {
  95. new string[64];
  96. format(string,sizeof(string),"%f,%f,%f\n",fX,fY,fZ);
  97. new File:hFile;
  98. hFile = fopen("Koordinate.txt", io_append);
  99. fwrite(hFile, string);
  100. fclose(hFile);
  101. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement