Guest User

Untitled

a guest
Feb 18th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. public sharkAttack(playerid) {
  2. CreateObject(1608, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  3. if (IsPlayerInRangeOfPoint(playerid, 40.0, x2, y2, z2)) {
  4. new Float:posx,Float:posy,Float:posz;
  5. GetPlayerPos(playerid, posx, posy, posz);
  6. new Float:Health = GetPlayerHealth(playerid,health);
  7. SetObjectToFaceCords(1608, posx, posy, posz);
  8. MoveObject(1608,0, 0, 0, 4);
  9. }
  10. if (IsPlayerInRangeOfPoint(playerid, 5.0, x2, y2, z2)) {
  11. StopObject(1608);
  12. while (IsPlayerInRangeOfPoint(playerid, 5.0, x2, y2, z2)) {
  13. SetTimer("Bite", 2000, false);
  14. }
  15.  
  16. public Bite() {
  17. SetPlayerHealth(playerid, Health-5);
  18. }
Add Comment
Please, Sign In to add comment