Weird simple thing
#1

{
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?
Reply
#2

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?
What is your point here?
pawn Код:
beginmarker = AddStaticPickup(1318, 1 ,-1674.0707,2603.3926,81.3388, 0); //Begin Marker
if(pickupid == beginmarker) SendClientMessage(playerid,COLOR_YELLOW,"Hello!");
Do you want it to display Hello! for all pickups?

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;
}
EDIT:
Oops, read wrong.
Try this for the OnPlayerPickupPickup:

pawn Код:
if(pickupid == beginmarker)
{
SendClientMessage(playerid,COLOR_YELLOW,"Hello!");
}
return 1;
And try changing the mode of the first pickup to 23 or 19.
Reply
#3

Sorry, I made a mistake.
You should use CreatePickup, This return the PickupID, AddStaticPickup returns 1 or 0 for succes.
Reply
#4

public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == beginmarker) { SendClientMessage(playerid,COLOR_YELLOW,"Hello!"); }
return 1;
}
________
LANDY
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)