Advertisement
Guest User

DraKoN - Belt System (English)

a guest
Jul 8th, 2010
568
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. //••••••••••••••••••••••••••••••••••••••••••••••••••••
  2. //••
  3. #include <a_samp>
  4. #define MEUS_SLOTS 20
  5. //************ Cores **************************
  6. #define AMARELO 0xFFFF00AA
  7. #define VERDE 0x33AA33A
  8. //********** Arrays ***************************
  9. new CintoPlayer[MEUS_SLOTS];
  10. //***************** CallBakcs (Detectar Batida *****************
  11. public OnVehicleDamageStatusUpdate(vehicleid, playerid)
  12. {
  13. if(CintoPlayer[playerid] == 0)
  14. {
  15. new Float:Px = 0.000000, Float:Py = 0.000000, Float:Pz = 0.000000, Float:Pa = 0.000000, Float:HV ;
  16. GetPlayerPos(playerid, Px, Py, Pz);//PEGA POS
  17. GetPlayerFacingAngle(playerid, Pa);//PEGA ANGULO
  18. GetVehicleHealth(vehicleid,HV);
  19. SetPlayerHealth(playerid,HV/10);
  20. SetPlayerPos(playerid,Px+2,Py+2,Pz+1);
  21. RemovePlayerFromVehicle(playerid);//REMOVE VEICULO
  22. ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
  23. ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
  24. SendClientMessage(playerid,AMARELO,"[WARNING]: Not That You Care Belt, Can Die");
  25. SetTimer("ANIM",5000,0);
  26. SetPlayerWantedLevel(playerid, 1);
  27. }
  28. return 1;
  29. }
  30. //************ CallBacks Para Anims **************************
  31. forward ANIM(playerid);
  32. public ANIM(playerid)
  33. {
  34. ClearAnimations(playerid);
  35. return 1;
  36. }
  37. //*************** Call Backs Entra Veiculos ******************
  38. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  39. {
  40. CintoPlayer[playerid] = 0;
  41. GameTextForPlayer(playerid, "~r~/Belt or ~n~dethas in crashs cars", 3000, 4);
  42. return 1;
  43. }
  44. //******** Call Backs Comandos *******************************
  45. public OnPlayerCommandText(playerid, cmdtext[])
  46. {
  47. if(!strcmp(cmdtext, "/belt", true))
  48. {
  49. CintoPlayer[playerid] = 1;
  50. SendClientMessage(playerid,VERDE,"[WARNING]: Congratulations You're Belt, is now protected (/takebelt)");
  51. SetPlayerWantedLevel(playerid, 0);
  52. return 1;
  53. }
  54. if(!strcmp(cmdtext, "/takebelt", true))
  55. {
  56. CintoPlayer[playerid] = 0;
  57. SendClientMessage(playerid,AMARELO,"[WARNING]: Not That You Care Belt, Can Die");
  58. SetPlayerWantedLevel(playerid, 0);
  59. return 1;
  60. }
  61. return 0;
  62. }
  63. //*************** The End *************************************
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement