Quote:
Originally Posted by Swankeh
Your problem is that you do not have to check if the player is close to x place because when this place near X will send you infinite messages, to solve your problem I suggest you create a Pickup of the property.
I will give you an example, where you have your properties, add I am in the loaded when you create it, that will be the picukp
PHP код:
new PickUpPropertyInfo[MAX_PROPERTY];
When you load them or create them
PHP код:
PickUpPropertyInfo[propertyid] = CreatePickup(1272, 2, PropertyInfo[propertyid][ePropertyEntrance][0], PropertyInfo[propertyid][ePropertyEntrance][1], PropertyInfo[propertyid][ePropertyEntrance][2]);
//Remember that propertyid you have to change depending on where you add it
PHP код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
for(new i = 1; i < MAX_PROPERTY; i++)
{
if(pickupid == PickUpPropertyInfo[i])
{
//In here you put the code you want me to send
}
}
return 1;
}
I have never used onplayerpickuppikup but according to me when you grab it you only teach it once and then if you pick it up again it shows you the message
|
So if I understand this right if i have 5 properties i have to make 5 pickups? and each one:
PHP код:
PickUpPropertyInfo[1] = CreatePickup(1272, 2, PropertyInfo[1]........