03.10.2017, 19:39
(
Последний раз редактировалось NLDBrian; 04.10.2017 в 12:18.
)
The following thing keeps repeating itself...
It just spams player in range with:
This property is for sale
OR
You're standing on %s's porch. Use /enter to go in.
Can anyone tell me how to fix this?
It just spams player in range with:
This property is for sale
OR
You're standing on %s's porch. Use /enter to go in.
Can anyone tell me how to fix this?
pawn Код:
function:OnPlayerNearProperty()
{
foreach(new i : Player)
{
if(PlayerInfo[i][pLoggedin] == false)
continue;
for(new p = 1; p < MAX_PROPERTY; p++)
{
if(!PropertyInfo[p][ePropertyDBID])
continue;
if(IsPlayerInRangeOfPoint(i, 3.0, PropertyInfo[p][ePropertyEntrance][0], PropertyInfo[p][ePropertyEntrance][1], PropertyInfo[p][ePropertyEntrance][2]))
{
if(GetPlayerInterior(i) != PropertyInfo[p][ePropertyEntranceInterior])
continue;
if(GetPlayerVirtualWorld(i) != PropertyInfo[p][ePropertyEntranceWorld])
continue;
if(!PropertyInfo[p][ePropertyOwnerDBID])
{
SendClientMessage(i, COLOR_DARKGREEN, "This property is for sale. Use /buyproperty.");
SendClientMessageEx(i, COLOR_DARKGREEN, "Price: $%i", PropertyInfo[p][ePropertyMarketPrice]);
}
else
{
SendClientMessageEx(i, COLOR_DARKGREEN, "You're standing on %s's porch. Use /enter to go in.", ReturnDBIDName(PropertyInfo[p][ePropertyOwnerDBID]));
}
}
}
}
return 1;
}