How to keep count?
#1

Well i need help with this what im trying to do is lets say i create 5 pickups how would i make it so it keeps count if a player has already found that pickup it will send him a message saying that they have found that pickup and when he finds all 5 pickups it sends another message.
Reply
#2

I made example:

pawn Код:
new PickupFound[MAX_PLAYERS];

// example:

if(pickupid == 1Pickup)
{
    if(PickupFound[playerid]==0)
    {
        // SendMessage you found 1pickup left 4pickups etc.
        PickupFound[playerid]=1;
    }
    else
    {
        // You Alredy have this pickup...
    }
}

if(pickupid == 2Pickup)
{
    if(PickupFound[playerid]==1)
    {
        // SendMessage you found 2pickup left 3pickups etc.
        PickupFound[playerid]=2;
    }
    else
    {
        // You have alredy have this pickup or don't have 1pickup
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)