11.04.2014, 11:58
pawn Код:
if(GetPlayerTeam(playerid) == 1) //red
{
if(IsPlayerInRangeOfPoint(playerid, -507.8125, 2107.421875, -267.578125, 2316.40625))
{
ShowPlayerDialog(playerid, SHOP_DIALOG, DIALOG_STYLE_LIST, "Weapon Shop", "Deagle: $500\nSawn-Off: $1000\nM4: $2000\nSniper: $3000", "Select", "Exit");//Show them the dialog.
return true;
}
}
else if(GetPlayerTeam(playerid) == 2) // blue
{
if(IsPlayerInRangeOfPoint(playerid, 3.90625, 1656.25,382.8125, 2121.0975))
{
ShowPlayerDialog(playerid, SHOP_DIALOG, DIALOG_STYLE_LIST, "Weapon Shop", "Deagle: $500\nSawn-Off: $1000\nM4: $2000\nSniper: $3000", "Select", "Exit");//Show them the dialog.
return true;
}
}
Note: range can't have negative value(-507.8125).