OnPlayerPickUpPickup

Funkcija kada igrač "pokupi" pickup kreiran pomoću CreatePickup funkcije...

Parametri:

(playerid,pickupid)

playerid // ID igrača koji je pokupio pickup.

pickupid // ID pickupa.

new pickup_Cash; new pickup_Health;

//Kreiramo Pickup

public OnGameModeInit {   pickup_Cash = CreatePickup(1274, 2, 0.0, 0.0, 9.0); pickup_Health = CreatePickup(1240, 2, 0.0, 0.0, 9.0); return 1; }

// Kada igrač pokupi pickup. public OnPlayerPickUpPickup(playerid, pickupid) {   if(pickupid == pickup_Cash) {       GivePlayerMoney(playerid, 1000); }   else if(pickupid == pickup_Health) {       SetPlayerHealth(playerid, 100); }   return 1; }