28.02.2010, 08:41
Quote:
Originally Posted by shoru93
{
beginmarker = AddStaticPickup(1318, 1 ,-1674.0707,2603.3926,81.3388, 0); //Begin Marker AddStaticPickup(1242, 2,1878.4462,2127.0789,32.5571, 0); //rw armour AddStaticPickup(1240, 2,1393.9027,2173.9392,9.7578, 0); //tdm health AddStaticPickup(1242, 2,1393.7491,2170.0439,9.7578, 0); //tdm armour AddStaticPickup(1242, 2, 2101.2607,2191.6355,13.4786, 0); //ww armour AddStaticPickup(1240, 2,2101.2024,2189.1536,13.4786, 0); //ww health AddStaticPickup(1240, 2,1878.5581,2142.9817,32.5571, 0); //rw health return 1; } _________________________________________________ public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == beginmarker) SendClientMessage(playerid,COLOR_YELLOW,"Hello!"); return 1; } _________________________________________________ It says "Hello!" when I enter in that first pickup (rw armour), why? |
pawn Код:
beginmarker = AddStaticPickup(1318, 1 ,-1674.0707,2603.3926,81.3388, 0); //Begin Marker
if(pickupid == beginmarker) SendClientMessage(playerid,COLOR_YELLOW,"Hello!");
pawn Код:
new pickups[7];
pickups[0] = AddStaticPickup(1318, 1 ,-1674.0707,2603.3926,81.3388, 0); //Begin Marker
pickups[1] = AddStaticPickup(1242, 2,1878.4462,2127.0789,32.5571, 0); //rw armour
pickups[2] = AddStaticPickup(1240, 2,1393.9027,2173.9392,9.7578, 0); //tdm health
pickups[3] = AddStaticPickup(1242, 2,1393.7491,2170.0439,9.7578, 0); //tdm armour
pickups[4] = AddStaticPickup(1242, 2, 2101.2607,2191.6355,13.4786, 0); //ww armour
pickups[5] = AddStaticPickup(1240, 2,2101.2024,2189.1536,13.4786, 0); //ww health
pickups[6] = AddStaticPickup(1240, 2,1878.5581,2142.9817,32.5571, 0); //rw health
public OnPlayerPickUpPickup(playerid, pickupid)
{
for(new p = 0; p < 7; p++)
{
if(pickupid == pickups[p])
{
SendClientMessage(playerid,COLOR_YELLOW,"Hello!");
return 1;
}
}
return 1;
}
Oops, read wrong.
Try this for the OnPlayerPickupPickup:
pawn Код:
if(pickupid == beginmarker)
{
SendClientMessage(playerid,COLOR_YELLOW,"Hello!");
}
return 1;