Advertisement
Guest User

[INC] Rotazione Player By ~Peppinux AKA Peppe_Stasu

a guest
Apr 21st, 2011
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.43 KB | None | 0 0
  1. /*******************************************************************************
  2. *                                                                              *
  3. *               @Nome script:     Peppinux_ Admin System                       *
  4. *               @Versione script: 1.0                                          *
  5. *               @Autore script:   ~Peppinux AKA Peppe_Stasu                    *
  6. *               @Ringraziamenti:                                               *
  7. *                                 .: Phantom :. - Idea script                  *
  8. *                                 mitosking     - Aiuto fix bug                *
  9. *                                                                              *
  10. *                                                                              *
  11. *               @ Script realizzato esclusivamente per GTA-Center.com          *
  12. *                                                                              *
  13. *               @ Vietato rimuovere i crediti.                                 *
  14. *                                                                              *
  15. *******************************************************************************/
  16.  
  17. //******************************************************************************
  18.  
  19. #include <a_samp>
  20.  
  21. //******************************************************************************
  22.  
  23. forward rotazionePlayer(playerid, Float:gradi);
  24.  
  25. //==============================================================================
  26.  
  27. enum E_GIOCATORE
  28. {
  29.     Float:gAngoloFacciale,
  30.     gTimerRotazione
  31. };
  32. new Giocatore[MAX_PLAYERS][E_GIOCATORE];
  33.  
  34. //******************************************************************************
  35.  
  36. stock inizioRotazionePlayer(playerid, Float:gradi = 1.0, ms = 50)
  37. {
  38.     GetPlayerFacingAngle(playerid, Giocatore[playerid][gAngoloFacciale]);
  39.     Giocatore[playerid][gTimerRotazione] = SetTimerEx("rotazionePlayer", ms, true, "df", playerid, gradi);
  40.     return 1;
  41. }
  42.  
  43. //==============================================================================
  44.  
  45. stock fineRotazionePlayer(playerid)
  46. {
  47.     KillTimer(Giocatore[playerid][gTimerRotazione]);
  48.     return 1;
  49. }
  50.  
  51. //******************************************************************************
  52.  
  53. public rotazionePlayer(playerid, Float:gradi)
  54. {
  55.     Giocatore[playerid][gAngoloFacciale] += gradi;
  56.     SetPlayerFacingAngle(playerid, Giocatore[playerid][gAngoloFacciale]);
  57.     return 1;
  58. }
  59.  
  60. //******************************************************************************
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement