Guest User

AoARyDeR

a guest
Feb 24th, 2009
904
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.99 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #pragma tabsize 0
  4.  
  5. new Float:PosX[MAX_PLAYERS], Float:PosY[MAX_PLAYERS], Float:PosZ[MAX_PLAYERS], Float:PosA[MAX_PLAYERS], PosI[MAX_PLAYERS]; //
  6.  
  7. public OnFilterScriptInit()
  8. {
  9. print("\n--------------------------------------");
  10. print("Simple AFK System by [AoA]RyDeR");
  11. print("--------------------------------------\n");
  12. return 1;
  13. }
  14.  
  15. public OnGameModeExit()
  16. {
  17. return 1;
  18. }
  19. public OnPlayerRequestSpawn(playerid)
  20. {
  21. return 1;
  22. }
  23.  
  24. public OnPlayerConnect(playerid)
  25. {
  26. return 1;
  27. }
  28.  
  29. public OnPlayerDisconnect(playerid, reason)
  30. {
  31. return 1;
  32. }
  33.  
  34. public OnPlayerSpawn(playerid)
  35. {
  36. return 1;
  37. }
  38.  
  39. public OnPlayerDeath(playerid, killerid, reason)
  40. {
  41. return 1;
  42. }
  43.  
  44. public OnVehicleSpawn(vehicleid)
  45. {
  46. return 1;
  47. }
  48.  
  49. public OnVehicleDeath(vehicleid, killerid)
  50. {
  51. return 1;
  52. }
  53.  
  54. public OnPlayerText(playerid, text[])
  55. {
  56. return 1;
  57. }
  58.  
  59. public OnPlayerPrivmsg(playerid, recieverid, text[])
  60. {
  61. return 1;
  62. }
  63.  
  64. public OnPlayerCommandText(playerid, cmdtext[])
  65. {
  66. if(strcmp(cmdtext, "/afk", true) == 0)
  67. {
  68. new string[256];
  69. GetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);
  70. GetPlayerFacingAngle(playerid, PosA[playerid]);
  71. PosI[playerid] = (GetPlayerInterior(playerid));
  72.  
  73. SetPlayerInterior(playerid,3);
  74. SetPlayerPos(playerid,198.3797,160.8905,1003.0300);
  75. SetPlayerFacingAngle(playerid,177.0350);
  76. SetCameraBehindPlayer(playerid);
  77.  
  78. TogglePlayerControllable(playerid,0);
  79. new away[MAX_PLAYER_NAME];
  80. GetPlayerName(playerid, away, MAX_PLAYER_NAME);
  81. format(string, sizeof(string), "%s is AFK!", away);
  82. GameTextForAll(string, 4000, 6);
  83. return 1;
  84. }
  85. if(strcmp(cmdtext, "/back", true) == 0)
  86. {
  87. SetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);
  88. SetPlayerFacingAngle(playerid, PosA[playerid]);
  89. SetCameraBehindPlayer(playerid);
  90. SetPlayerInterior(playerid, PosI[playerid]);
  91. new string[256];
  92. TogglePlayerControllable(playerid,1);
  93. new back[MAX_PLAYER_NAME];
  94. GetPlayerName(playerid, back, MAX_PLAYER_NAME);
  95. format(string, sizeof(string), "%s is BACK!", back);
  96. GameTextForAll(string, 4000, 6);
  97. return 1;
  98. }
  99. return 0;
  100. }
  101.  
  102. public OnPlayerInfoChange(playerid)
  103. {
  104. return 1;
  105. }
  106.  
  107. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  108. {
  109. return 1;
  110. }
  111.  
  112. public OnPlayerExitVehicle(playerid, vehicleid)
  113. {
  114. return 1;
  115. }
  116.  
  117. public OnPlayerStateChange(playerid, newstate, oldstate)
  118. {
  119. return 1;
  120. }
  121.  
  122. public OnPlayerEnterCheckpoint(playerid)
  123. {
  124. return 1;
  125. }
  126.  
  127. public OnPlayerLeaveCheckpoint(playerid)
  128. {
  129. return 1;
  130. }
  131.  
  132. public OnPlayerEnterRaceCheckpoint(playerid)
  133. {
  134. return 1;
  135. }
  136.  
  137. public OnPlayerLeaveRaceCheckpoint(playerid)
  138. {
  139. return 1;
  140. }
  141.  
  142. public OnRconCommand(cmd[])
  143. {
  144. return 1;
  145. }
  146.  
  147. public OnObjectMoved(objectid)
  148. {
  149. return 1;
  150. }
  151.  
  152. public OnPlayerObjectMoved(playerid, objectid)
  153. {
  154. return 1;
  155. }
  156.  
  157. public OnPlayerPickUpPickup(playerid, pickupid)
  158. {
  159. return 1;
  160. }
  161.  
  162. public OnPlayerSelectedMenuRow(playerid, row)
  163. {
  164. return 1;
  165. }
  166.  
  167. public OnPlayerExitedMenu(playerid)
  168. {
  169. return 1;
  170. }
  171.  
Advertisement
Add Comment
Please, Sign In to add comment