18.12.2010, 09:41
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.
Without the streamer only think that comes to my mind that might work is this, (and what the nice people above said)
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;
}
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == swatpickup && gTeam[playerid] != SWAT) return 0;
return 1;
}