Guest User

Untitled

a guest
Jan 14th, 2013
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.36 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. /*================================= Funktionen =================================
  4. native SetPlayerPosEx(playerid, Float:X, Float:Y, Float:Z, Float:A);
  5. native SetPlayerInteriorEx(playerid, InteriorID, Float:X, Float:Y, Float:Z, Float:A);
  6. native SetPlayerWorld(playerid, Virtualworld, Float:X, Float:Y, Float:Z, Float:A); //
  7. native SetPlayerInteriorWorld(playerid, Virtualworld, InteriorID, Float:X, Float:Y, Float:Z, Float:A);
  8. native SetVehiclePosEx(playerid, Float:X, Float:Y, Float:Z, Float:A);
  9. native SetVehicleWorld(playerid, Virtualworld, Float:X, Float:Y, Float:Z, Float:A);
  10. native GetPlayerIpEx(playerid);
  11. native GetPlayerNameEx(playerid);
  12. native FreezePlayer(playerid);
  13. native UnfreezePlayer(playerid);
  14. native HealPlayer(playerid);
  15. native KillPlayer(playerid);
  16. */
  17.  
  18. stock SetPlayerPosEx(playerid, Float:X, Float:Y, Float:Z, Float:A)
  19. {
  20. SetPlayerPos(playerid, X, Y, Z);
  21. SetPlayerFacingAngle(playerid, A);
  22. SetCameraBehindPlayer(playerid);
  23. SetPlayerInterior(playerid, 0);
  24. return 1;
  25. }
  26.  
  27. stock SetPlayerWorld(playerid, Virtualworld, Float:X, Float:Y, Float:Z, Float:A)
  28. {
  29. SetPlayerVirtualWorld(playerid, Virtualworld);
  30. SetPlayerPos(playerid, X, Y, Z);
  31. SetPlayerFacingAngle(playerid, A);
  32. SetCameraBehindPlayer(playerid);
  33. SetPlayerInterior(playerid, 0);
  34. return 1;
  35. }
  36.  
  37. stock SetPlayerInteriorEx(playerid, InteriorID, Float:X, Float:Y, Float:Z, Float:A)
  38. {
  39. SetPlayerInterior(playerid, InteriorID);
  40. SetPlayerPos(playerid, X, Y, Z);
  41. SetPlayerFacingAngle(playerid, A);
  42. SetCameraBehindPlayer(playerid);
  43. return 1;
  44. }
  45.  
  46. stock SetPlayerInteriorWorld(playerid, Virtualworld, InteriorID, Float:X, Float:Y, Float:Z, Float:A)
  47. {
  48. SetPlayerVirtualWorld(playerid, Virtualworld);
  49. SetPlayerInterior(playerid, InteriorID);
  50. SetPlayerPos(playerid, X, Y, Z);
  51. SetPlayerFacingAngle(playerid, A);
  52. SetCameraBehindPlayer(playerid);
  53. return 1;
  54. }
  55.  
  56. stock SetVehiclePosEx(playerid, Float:X, Float:Y, Float:Z, Float:A)
  57. {
  58. if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  59. {
  60. SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
  61. SetVehicleZAngle(GetPlayerVehicleID(playerid), A);
  62. SetCameraBehindPlayer(playerid);
  63. }
  64. else
  65. {
  66. TelePlayer(playerid, X, Y, Z, A);
  67. }
  68. return 1;
  69. }
  70.  
  71. stock SetVehicleWorld(playerid, Virtualworld, Float:X, Float:Y, Float:Z, Float:A)
  72. {
  73. if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  74. {
  75. SetPlayerVirtualWorld(playerid, Virtualworld);
  76. SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
  77. SetVehicleZAngle(GetPlayerVehicleID(playerid), A);
  78. SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), Virtualworld);
  79. SetCameraBehindPlayer(playerid);
  80. }
  81. else
  82. {
  83. TelePlayerWorld(playerid, Virtualworld, Float:X, Float:Y, Float:Z, Float:A);
  84. }
  85. return 1;
  86. }
  87.  
  88. stock GetPlayerIpEx(playerid)
  89. {
  90. new ip[24];
  91. GetPlayerIp(playerid, ip,sizeof(ip));
  92. return ip;
  93. }
  94.  
  95. stock GetPlayerNameEx(playerid)
  96. {
  97. new name[MAX_PLAYER_NAME];
  98. GetPlayerName(playerid,name,sizeof(name));
  99. return name;
  100. }
  101.  
  102. stock FreezePlayer(playerid)
  103. {
  104. TogglePlayerControllable(playerid, false);
  105. return 1;
  106. }
  107.  
  108. stock UnfreezePlayer(playerid)
  109. {
  110. TogglePlayerControllable(playerid, true);
  111. return 1;
  112. }
  113.  
  114. stock HealPlayer(playerid)
  115. {
  116. SetPlayerHealth(playerid,100.0);
  117. return 1;
  118. }
  119.  
  120. stock KillPlayer(playerid)
  121. {
  122. SetPlayerHealth(playerid,0.0);
  123. return 1;
  124. }
Advertisement
Add Comment
Please, Sign In to add comment