Guest User

DraKoN

a guest
Jun 6th, 2010
1,659
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.43 KB | None | 0 0
  1. ///////////////////////////////////////////////////////
  2. //•••••••••••••••••••••••••••••••••••••••••••••••••••//
  3. //•• [INC]Sistema VIP ••//
  4. //•• Criado por DraKoN ••//
  5. //•• www.pawnsamp.blogspot.com ••//
  6. //•• ••//
  7. //•••••••••••••••••••••••••••••••••••••••••••••••••••//
  8. ///////////////////////////////////////////////////////
  9. #include <a_samp>
  10. #define MEUS_SLOTS 20
  11. //************ Cores **************************
  12. #define AMARELO 0xFFFF00AA
  13. #define VERDE 0x33AA33A
  14. //********** Arrays ***************************
  15. new CintoPlayer[MEUS_SLOTS];
  16. //***************** CallBakcs (Detectar Batida *****************
  17. public OnVehicleDamageStatusUpdate(vehicleid, playerid)
  18. {
  19. if(CintoPlayer[playerid] == 0)
  20. {
  21. new Float:Px = 0.000000, Float:Py = 0.000000, Float:Pz = 0.000000, Float:Pa = 0.000000, Float:HV ;
  22. GetPlayerPos(playerid, Px, Py, Pz);//PEGA POS
  23. GetPlayerFacingAngle(playerid, Pa);//PEGA ANGULO
  24. GetVehicleHealth(vehicleid,HV);
  25. SetPlayerHealth(playerid,HV/10);
  26. SetPlayerPos(playerid,Px+2,Py+2,Pz+1);
  27. RemovePlayerFromVehicle(playerid);//REMOVE VEICULO
  28. ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
  29. ClearAnimations(playerid);
  30. ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
  31. SendClientMessage(playerid,AMARELO,"[AVISO]: Cuidado Você Esta Sem Cinto, Pode Morrer");
  32. SetTimer("ANIM",5000,0);
  33. SetPlayerWantedLevel(playerid, 1);
  34. }
  35. return 1;
  36. }
  37. //************ CallBacks Para Anims **************************
  38. forward ANIM(playerid);
  39. public ANIM(playerid)
  40. {
  41. ClearAnimations(playerid);
  42. return 1;
  43. }
  44. //*************** Call Backs Entra Veiculos ******************
  45. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  46. {
  47. CintoPlayer[playerid] = 0;
  48. GameTextForPlayer(playerid, "~r~/cinto Caso Contrario ~n~Morrer em Batidas", 3000, 4);
  49. return 1;
  50. }
  51. //******** Call Backs Comandos *******************************
  52. public OnPlayerCommandText(playerid, cmdtext[])
  53. {
  54. if(!strcmp(cmdtext, "/cinto", true))
  55. {
  56. if(IsPlayerInAnyVehicle(playerid))
  57. {
  58. if(CintoPlayer[playerid] == 1)
  59. {
  60. CintoPlayer[playerid] = 1;
  61. SendClientMessage(playerid,VERDE,"[AVISO]: Parabéns Você esta de Cinto, Agora Esta Protegido (/tirarcinto)");
  62. SetPlayerWantedLevel(playerid, 0);
  63. }else{
  64. SendClientMessage(playerid,VERDE,"[AVISO]: Você não esta a um Carro");
  65. }
  66. }else{
  67. SendClientMessage(playerid,VERDE,"[AVISO]: Você Já Esta comCinto");
  68. }
  69. return 1;
  70. }
  71. if(!strcmp(cmdtext, "/tirarcinto", true))
  72. {
  73. if(IsPlayerInAnyVehicle(playerid))
  74. {
  75. if(CintoPlayer[playerid] == 0)
  76. {
  77. CintoPlayer[playerid] = 0;
  78. SendClientMessage(playerid,AMARELO,"[AVISO]: Cuidado Você Esta Sem Cinto, Pode Morrer (/cinto)");
  79. SetPlayerWantedLevel(playerid, 0);
  80. }else{
  81. SendClientMessage(playerid,VERDE,"[AVISO]: Você não esta a um Carro");
  82. }
  83. }else{
  84. SendClientMessage(playerid,VERDE,"[AVISO]: Você Já Esta sem Cinto");
  85. }
  86. return 1;
  87. }
  88. return 0;
  89. }
  90. //*************** The End *************************************
Advertisement
Add Comment
Please, Sign In to add comment