FANDOM


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;
}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.