06.05.2020, 18:58
Somewhere:
In OnGameModeInit (change the x, y, z):
In OnPlayerPickUpPickup:
Code:
new healthpickups[4];
Code:
healthpickups[0] = CreatePickup(1240, 1, x, y, z); healthpickups[1] = CreatePickup(1240, 1, x, y, z); healthpickups[2] = CreatePickup(1240, 1, x, y, z); healthpickups[3] = CreatePickup(1240, 1, x, y, z); }
Code:
for (new p = 0; p < sizeof(healthpickups); p++) { if (healthpickups[p] != pickupid) continue; if (GetPlayerMoney(playerid) >= 1200) { new Float:health; GetPlayerHealth(playerid, health); if (health < 100.0) { GivePlayerMoney(playerid, -1200); SetPlayerHealth(playerid, 100.0); } } return 1; }