Range of Point - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Range of Point (
/showthread.php?tid=434732)
Range of Point -
Squirrel - 03.05.2013
What did I do wrong?
Код:
CMD:shop(playerid, params[])
{
if(!IsPlayerInRangeOfPoint(playerid, 8.0, 1958.3783, 1343.1572, 15.3746)) return SendClientMessage(playerid, COLOR_RED, "<!>You are not near any shop NPC!");
ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST,"SHOP","Heal (500$)\nArmour(600$)\nWeapons","buy","Exit");
return 1;
}
No errors, but it says <!>You are not near any shop NPC!
AW: Range of Point -
Squirrel - 03.05.2013
nvm.
Wrong coords.
Re: Range of Point -
jakejohnsonusa - 03.05.2013
First check the corrdinates to make sure they're right.
Then if they are, try this:
pawn Код:
CMD:shop(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1958.3783, 1343.1572, 15.3746))
{
ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST,"SHOP","Heal (500$)\nArmour(600$)\nWeapons","buy","Exit");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, "<!>You are not near any shop NPC!");
return 1;
}
}
EDIT: Oh lol, I thought that was the problem. Well a +1 would be nice anyways!