Pickup only for a specific team
#10

I'll give you a nice way to do it incase you do use the streamer plugin. I've used these callbacks as an example i dont know where you need this. Unless im mistaken these pickups wont even show on other players screens.
pawn Код:
#include <a_samp>
#include <streamer>

#define MAX_T_PICKUPS           (50)//changme

#define SWAT                    (1)

new gTeam[MAX_PLAYERS];

new TeamPickups[MAX_PLAYERS][MAX_T_PICKUPS];

public OnPlayerConnect(playerid)
{
    gTeam[playerid] = SWAT;
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    gTeam[playerid] = 0;
    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(gTeam[playerid] == SWAT)
    {
        TeamPickups[playerid][0] = CreateDynamicPickup(28, 23, 0.0, 0.0, 0.0, -1, -1, playerid, 100.0);//swap co-ords obviously
        TeamPickups[playerid][1] = CreateDynamicPickup(29, 23, 0.0, 0.0, 0.0, -1, -1, playerid, 100.0);
    }
    return 1;
}
Without the streamer only think that comes to my mind that might work is this, (and what the nice people above said)
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == swatpickup && gTeam[playerid] != SWAT) return 0;
    return 1;
}
Reply


Messages In This Thread
Pickup only for a specific team - by Face9000 - 17.12.2010, 11:25
Re: Pickup only for a specific team - by Face9000 - 18.12.2010, 09:11
Re: Pickup only for a specific team - by iggy1 - 18.12.2010, 09:17
Re: Pickup only for a specific team - by Berky - 18.12.2010, 09:18
Re: Pickup only for a specific team - by iggy1 - 18.12.2010, 09:19
Re: Pickup only for a specific team - by [UG]Scripter - 18.12.2010, 09:20
Re: Pickup only for a specific team - by Berky - 18.12.2010, 09:22
Re: Pickup only for a specific team - by [UG]Scripter - 18.12.2010, 09:25
Re: Pickup only for a specific team - by Rachael - 18.12.2010, 09:33
Re: Pickup only for a specific team - by iggy1 - 18.12.2010, 09:41

Forum Jump:


Users browsing this thread: 1 Guest(s)