Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public sharkAttack(playerid) {
- CreateObject(1608, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
- if (IsPlayerInRangeOfPoint(playerid, 40.0, x2, y2, z2)) {
- new Float:posx,Float:posy,Float:posz;
- GetPlayerPos(playerid, posx, posy, posz);
- new Float:Health = GetPlayerHealth(playerid,health);
- SetObjectToFaceCords(1608, posx, posy, posz);
- MoveObject(1608,0, 0, 0, 4);
- }
- if (IsPlayerInRangeOfPoint(playerid, 5.0, x2, y2, z2)) {
- StopObject(1608);
- while (IsPlayerInRangeOfPoint(playerid, 5.0, x2, y2, z2)) {
- SetTimer("Bite", 2000, false);
- }
- public Bite() {
- SetPlayerHealth(playerid, Health-5);
- }
Add Comment
Please, Sign In to add comment