Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3.  
  4. enum xx
  5. {
  6. Float:LastX,
  7. Float:LastY,
  8. Float:LastZ,
  9. Float:LastA
  10. }
  11.  
  12. new Player[MAX_PLAYERS][xx];
  13.  
  14. public OnPlayerDeath(playerid, killerid, reason)
  15. {
  16. new Float:X, Float:Y, Float:Z, Float:A;
  17. GetPlayerPos(playerid, X,Y,Z);
  18. GetPlayerFacingAngle(playerid, A);
  19. Player[playerid][LastX] = X;
  20. Player[playerid][LastY] = Y;
  21. Player[playerid][LastZ] = Z;
  22. Player[playerid][LastA] = A;
  23. return 1;
  24. }
  25.  
  26. public OnPlayerSpawn(playerid)
  27. {
  28. SetPlayerPos(playerid, Player[playerid][LastX], Player[playerid][LastY], Player[playerid][LastZ]);
  29. SetPlayerFacingAngle(playerid, Player[playerid][LastA]);
  30. return 1;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement