Advertisement
Guest User

new damange

a guest
Aug 16th, 2012
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. new Float:VidaB[200];
  2. new Float:ChalecoB[200];
  3.  
  4. forward QuitarObj(playerid);
  5. public QuitarObj(playerid)
  6. {
  7. for(new i=0; i < 5; i++)
  8. {
  9. if(IsPlayerAttachedObjectSlotUsed(playerid,i))
  10. {
  11. RemovePlayerAttachedObject(playerid,i);
  12. }
  13. }
  14. }
  15.  
  16. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  17. {
  18. new Float:Vida;
  19. GetPlayerHealth(playerid, Vida);
  20. if(Vida < VidaB[playerid])
  21. {
  22. SetTimerEx("VidaHold",600,0,"d",playerid);
  23. SetPlayerAttachedObject(playerid, 0, 1240, 1, 0.797953, 0.070644, 0.001249, 0.521487, 89.103843, 0.000000, 1.000000, 1.000000, 1.000000);
  24. }
  25. VidaB[playerid] = Vida;
  26. SetTimerEx("QuitarObj",2000,0,"d",playerid);
  27.  
  28. new Float:Chaleco;
  29. GetPlayerArmour(playerid, Chaleco);
  30. if(Chaleco < ChalecoB[playerid])
  31. {
  32. SetTimerEx("ChalecoHold",600,0,"d",playerid);
  33. SetPlayerAttachedObject(playerid, 0, 1242, 1, 0.797953, 0.070644, 0.001249, 0.521487, 89.103843, 0.000000, 1.000000, 1.000000, 1.000000);
  34. }
  35. ChalecoB[playerid] = Chaleco;
  36. SetTimerEx("QuitarObj",2000,0,"d",playerid);
  37. return 1;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement